Skip to content

Commit

Permalink
#8 Adapting code to the Flake8 warnings.
Browse files Browse the repository at this point in the history
Signed-off-by: worstprgr <[email protected]>
  • Loading branch information
worstprgr committed Dec 22, 2023
1 parent 1183c93 commit d7e879d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/codecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@ jobs:
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics
flake8 . --count --max-complexity=10 --max-line-length=120 --show-source --statistics
8 changes: 5 additions & 3 deletions amc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python
"""
This tool compares the Git author and e-mail address of the latest commit, against a custom white list.
Expand Down Expand Up @@ -97,11 +97,13 @@ def parse_whitelist_file(self) -> None:
class FilePaths:
def __init__(self, path: str = None):
self.whitelist_file: pathlib.Path = self.conv_path('whitelist.amc')
if path: self.whitelist_file = self.conv_path(path)
if path:
self.whitelist_file = self.conv_path(path)

@staticmethod
def conv_path(path: str) -> pathlib.Path:
if type(path) == str: return pathlib.Path(path)
if type(path) is str:
return pathlib.Path(path)
return path


Expand Down

0 comments on commit d7e879d

Please sign in to comment.