Skip to content

Commit

Permalink
Fix pylint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
thombet committed May 7, 2020
1 parent 2a16084 commit 9c52179
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion kodi_addon_checker/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ def main():
parser.add_argument("--PR", help="Tell if tool is to run on a pull requests or not", action='store_true')
parser.add_argument("--allow-folder-id-mismatch", help="Allow the addon's folder name and id to mismatch",
action="store_true")
parser.add_argument("--enable-debug-log", help="Enable debug logging to %s" % os.path.basename(get_debug_log_path()),
parser.add_argument("--enable-debug-log",
help="Enable debug logging to %s" % os.path.basename(get_debug_log_path()),
action="store_true", default=False)
ConfigManager.fill_cmd_args(parser)
args = parser.parse_args()
Expand Down
3 changes: 2 additions & 1 deletion kodi_addon_checker/check_addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ def start(addon_path, args, all_repo_addons, config=None):
# General blacklist
check_string.find_blacklisted_strings(addon_report, addon_path, [], [], [])

check_files.check_file_whitelist(addon_report, file_index, addon_path, debug_log_enabled, reporter_log_enabled)
check_files.check_file_whitelist(addon_report, file_index, addon_path,
debug_log_enabled, reporter_log_enabled)
else:
addon_report.add(
Record(INFORMATION, "Addon marked as broken - skipping"))
Expand Down
6 changes: 5 additions & 1 deletion kodi_addon_checker/check_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ def check_for_new_language_directory_structure(report: Report, addon_path: str,
"an upper branch/kodi version." % os.path.join(language_path, directory)))


def check_file_whitelist(report: Report, file_index: list, addon_path: str, debug_log_enabled: bool, reporter_log_enabled: bool):
def check_file_whitelist(report: Report,
file_index: list,
addon_path: str,
debug_log_enabled: bool,
reporter_log_enabled: bool):
"""Check whether the files present in addon are in whitelist or not
It ignores the .gitignore file and the log files generated by the tool
(if the associated arguments are used).
Expand Down
1 change: 0 additions & 1 deletion kodi_addon_checker/plugins/log_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"""
import logging
import logging.handlers
import os

from kodi_addon_checker.common import get_reporter_log_path
from kodi_addon_checker.report import Record
Expand Down
2 changes: 1 addition & 1 deletion tests/test_check_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def setUp(self):
self.file_index.append({"path": os.path.dirname(get_debug_log_path()),
"name": self.debug_log_filename})
self.file_index.append({"path": os.path.dirname(get_reporter_log_path()),
"name": self.reporter_log_filename})
"name": self.reporter_log_filename})

def check_if_log_files_were_reported(self):
"""Helper function to check if the log files were reported."""
Expand Down

0 comments on commit 9c52179

Please sign in to comment.