Skip to content

Commit c953d27

Browse files
authored
Merge pull request #32 from nexB/26-update-docstrings-to-imperative-style
Update docstrings to imperative style #26
2 parents f06ba66 + 8de7ba0 commit c953d27

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/deltacode/__init__.py

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

3636
class DeltaCode(object):
3737
"""
38-
Handles the basic operations on a pair of incoming ScanCode scans (in JSON
38+
Handle the basic operations on a pair of incoming ScanCode scans (in JSON
3939
format) and the Delta objects created from a comparison of the files (in
4040
the form of File objects) contained in those scans.
4141
"""
@@ -46,9 +46,9 @@ def __init__(self, new_path, old_path):
4646

4747
def align_scan(self):
4848
"""
49-
Seeks to align the paths of a pair of files (File objects) in the pair
49+
Seek to align the paths of a pair of files (File objects) in the pair
5050
of incoming scans so that the attributes and other characteristics of
51-
the files can be compared with one another. Calls utils.fix_trees(),
51+
the files can be compared with one another. Call utils.fix_trees(),
5252
which calls utils.align_trees().
5353
"""
5454
try:
@@ -63,7 +63,7 @@ def determine_delta(self):
6363
"""
6464
Given new and old scans, return an OrderedDict of Delta objects grouping
6565
the objects under the keys 'added', 'modified', 'removed' or 'unmodified'.
66-
Returns None if no File objects can be loaded from either scan.
66+
Return None if no File objects can be loaded from either scan.
6767
"""
6868
if self.new.files is None or self.old.files is None:
6969
return None

src/deltacode/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ def generate_json(delta, result_file):
7171
@click.option('-j', '--json-file', prompt=False, type=click.Path(exists=False), help='Identify the path to the .json output file')
7272
def cli(new, old, csv_file, json_file):
7373
"""
74-
This script identifies the changes that need to be made to the 'old'
74+
Identify the changes that need to be made to the 'old'
7575
scan file (-o or -old) in order to generate the 'new' scan file (-n or
76-
-new). The results are written to a .csv file (-c or -csv-file) or a
76+
-new). Write the results to a .csv file (-c or -csv-file) or a
7777
.json file (-j or -json-file) at a user-designated location. If no file
78-
option is selected, the JSON results are printed to the console.
78+
option is selected, print the JSON results to the console.
7979
"""
8080
# do the delta
8181
delta = DeltaCode(new, old)

src/deltacode/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
class Scan(object):
3434
"""
35-
Processes the files contained in an incoming ScanCode scan to test whether
35+
Process the files contained in an incoming ScanCode scan to test whether
3636
they are valid, retrieve the scan's 'files_count' value, create a list of
3737
File objects, and generate a dictionary of File objects indexed by a
3838
selected key.

0 commit comments

Comments
 (0)