Skip to content

Commit 67d8ec8

Browse files
committed
linting
1 parent 374c638 commit 67d8ec8

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

src/sagemaker/jumpstart/curated_hub/accessors/filegenerator.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ def __init__(
3535

3636
@singledispatchmethod
3737
def format(self, file_input) -> List[FileInfo]:
38-
"""Dispatch method that takes in an input of either ``S3ObjectLocation`` or
39-
``JumpStartModelSpecs`` and is implemented in below registered functions.
40-
"""
38+
"""Dispatch method that is implemented in below registered functions.
39+
40+
Takes in an input of either ``S3ObjectLocation`` or ``JumpStartModelSpecs``."""
4141
# pylint: disable=W0107
4242
pass
4343

@@ -81,10 +81,7 @@ def s3_format(self, file_input: S3ObjectLocation) -> List[FileInfo]:
8181
def specs_format(
8282
self, file_input: JumpStartModelSpecs, studio_specs: Dict[str, Any]
8383
) -> List[FileInfo]:
84-
"""
85-
Collects data locations from JumpStart public model specs and
86-
converts into FileInfo.
87-
"""
84+
"""Collects data locations from JumpStart public model specs and converts into FileInfo."""
8885
public_model_data_accessor = PublicModelDataAccessor(
8986
region=self.region, model_specs=file_input, studio_specs=studio_specs
9087
)

src/sagemaker/jumpstart/curated_hub/accessors/sync.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ class FileSync:
2626
"""Something."""
2727

2828
def __init__(self, src_files: List[FileInfo], dest_files: List[FileInfo], dest_bucket: str):
29-
"""Instantiates a ``FileSync`` class.
30-
Sorts src and dest files by name for easier
31-
comparisons.
29+
"""Instantiates a ``FileSync`` class. Sorts src and dest files by name for comparisons.
3230
3331
Args:
3432
src_files (List[FileInfo]): List of files to sync with destination
@@ -41,8 +39,7 @@ def __init__(self, src_files: List[FileInfo], dest_files: List[FileInfo], dest_b
4139
self.dest_bucket = dest_bucket
4240

4341
def call(self) -> Generator[FileInfo, FileInfo, FileInfo]:
44-
"""This function performs the actual comparisons. Returns a list of FileInfo
45-
to copy.
42+
"""This function performs the actual comparisons. Returns a list of FileInfo to copy.
4643
4744
Algorithm:
4845
Loop over sorted files in the src directory. If at the end of dest directory,

src/sagemaker/jumpstart/curated_hub/accessors/synccomparator.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,16 @@ def determine_should_sync(self, src_file: FileInfo, dest_file: FileInfo) -> bool
3838
return should_sync
3939

4040
def compare_size(self, src_file: FileInfo, dest_file: FileInfo):
41-
"""
41+
"""Compares sizes of src and dest files.
42+
4243
:returns: True if the sizes are the same.
4344
False otherwise.
4445
"""
4546
return src_file.size == dest_file.size
4647

4748
def compare_time(self, src_file: FileInfo, dest_file: FileInfo):
48-
"""
49+
"""Compares time delta between src and dest files.
50+
4951
:returns: True if the file does not need updating based on time of
5052
last modification and type of operation.
5153
False if the file does need updating based on the time of

0 commit comments

Comments
 (0)