Skip to content

Commit

Permalink
Added underscore to ignore new pydocstyle item (#428)
Browse files Browse the repository at this point in the history
* Added underscore to ignore new item

Signed-off-by: Crola1702 <cristobal.arroyo@ekumenlabs.com>
(cherry picked from commit ae431ed)

# Conflicts:
#	ament_pep257/ament_pep257/main.py
  • Loading branch information
Crola1702 authored and mergify[bot] committed Jan 12, 2023
1 parent 9f2b2f2 commit 6d26b25
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ament_pep257/ament_pep257/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def generate_pep257_report(paths, excludes, ignore):
report = []

files_dict = {}
<<<<<<< HEAD
if LooseVersion(pydocstyle.__version__) >= LooseVersion('2.0.0'):
for filename, checked_codes, ignore_decorators in files_to_check:
if _filename_in_excludes(filename, excludes):
Expand All @@ -144,6 +145,16 @@ def generate_pep257_report(paths, excludes, ignore):
files_dict[filename] = {
'select': select,
}
=======
# Unpack 3 values for pydocstyle <= 6.1.1 and 4 values for pydocstyle >= 6.2.0
for filename, checked_codes, ignore_decorators, *_ in files_to_check:
if _filename_in_excludes(filename, excludes):
continue
files_dict[filename] = {
'select': checked_codes,
'ignore_decorators': ignore_decorators,
}
>>>>>>> ae431ed (Added underscore to ignore new pydocstyle item (#428))

for filename in sorted(files_dict.keys()):
print('checking', filename)
Expand Down

0 comments on commit 6d26b25

Please sign in to comment.