Skip to content

Commit

Permalink
more pycodestyle fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronkaplan committed Nov 22, 2023
1 parent 474371c commit fabab82
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pycodestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
- name: Analysing the code with pycodestyle
run: |
pycodestyle --exclude=venv --ignore=errors=E221,E225,E251,E501,E266,E302 --max-line-length=128 $(git ls-files '*.py')
pycodestyle --exclude=venv --ignore=errors=E302,E221,E225,E251,E501,E266,E302 --max-line-length=128 $(git ls-files '*.py')
7 changes: 5 additions & 2 deletions analyzers/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
-v --version Show version.
"""
import os
from optparse import OptionParser
# from optparse import OptionParser
import json
import ijson
from docopt import docopt
import glob
# import glob

version_string = "sysdiagnose-demo-analyser.py v2023-04-28 Version 0.1"

Expand All @@ -32,6 +32,7 @@

# --------------------------------------------------------------------------- #


def apps_analysis(jsondir, filename):
"""
Go through all json files in the folder and generate the markdown file
Expand Down Expand Up @@ -94,6 +95,8 @@ def apps_analysis(jsondir, filename):
"""
Main function
"""


def main():
"""
Main function, to be called when used as CLI tool
Expand Down
10 changes: 5 additions & 5 deletions parsers/sysdiagnose-networkextension.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
-v --version Show version.
"""

import sys
from optparse import OptionParser
import plistlib
# import sys
# from optparse import OptionParser
# import plistlib
import biplist
import json
# import json
from docopt import docopt
from tabulate import tabulate

Expand All @@ -45,7 +45,7 @@ def parseplist(file):
output = {'objects': []}

for object in objects:
if isinstance(object,str):
if isinstance(object, str):
output['objects'].append(object)

return output
Expand Down
2 changes: 1 addition & 1 deletion parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def parse(parser, case_id):
spec.loader.exec_module(module)

# building command
if type(case[module.parser_input]) == str:
if isinstance(case[module.parser_input], str):
command = 'module.' + module.parser_call + '(\'' + case[module.parser_input] + '\')'
else:
command = 'module.' + module.parser_call + '(' + str(case[module.parser_input]) + ')'
Expand Down

0 comments on commit fabab82

Please sign in to comment.