Skip to content

Commit

Permalink
Fix Linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
vodorok committed Oct 14, 2024
1 parent ea1d3c0 commit 15c4a0d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
16 changes: 11 additions & 5 deletions analyzer/codechecker_analyzer/analysis_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,13 @@ def print_analyzer_statistic_summary(metadata_analyzers, status, msg=None):
LOG.info(" %s: %s", analyzer_type, res)


def worker_result_handler(results, metadata_tool, output_path, plist_file_name):
def worker_result_handler(results,
metadata_tool,
output_path,
plist_file_name):
"""
Handle analysis results after all the analyzer threads returned. It may
merge all the plist output files into one, and print the analysis summary.
Handle analysis results after all the analyzer threads returned. It may
merge all the plist output files into one, and print the analysis summary.
"""
LOG.info("Merging plist files into %s", plist_file_name)
if plist_file_name:
Expand All @@ -72,7 +75,7 @@ def worker_result_handler(results, metadata_tool, output_path, plist_file_name):
for _, _, _, _, original_plist, _ in results:
original_plist = Path(original_plist)
if os.path.exists(original_plist):
with open(original_plist, 'rb') as plist:
with open(original_plist, 'rb') as plist:
LOG.debug(f"Merging original plist {original_plist}")
plist_data.append(plistlib.load(plist))

Expand Down Expand Up @@ -837,7 +840,10 @@ def signal_handler(signum, _):
analyzed_actions,
1,
callback=lambda results: worker_result_handler(
results, metadata_tool, output_path, plist_file_name)
results,
metadata_tool,
output_path,
plist_file_name)
).get(timeout)

pool.close()
Expand Down
2 changes: 1 addition & 1 deletion analyzer/codechecker_analyzer/buildlog/build_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ def with_attr(self, attr, value):
details = {key: getattr(self, key) for key in BuildAction.__slots__}
details[attr] = value
return BuildAction(**details)

def __repr__(self):
return str(self)
2 changes: 1 addition & 1 deletion analyzer/codechecker_analyzer/cmd/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def add_arguments_to_parser(parser):
"If it is not given then the results go into a "
"temporary directory which will be removed after "
"the analysis.")

parser.add_argument('--plist-file-name',
type=str,
dest="plist_file_name",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def get_reports(
return reports

if not isinstance(plist, list):
plist=[plist]
plist = [plist]

for sub_plist in plist:

Expand Down

0 comments on commit 15c4a0d

Please sign in to comment.