Skip to content

Commit

Permalink
ci: add flake8 pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-awd committed Oct 8, 2023
1 parent 4d82544 commit 2bb268d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 88
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ repos:
require_serial: true
types_or: [python, pyi]

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
name: flake8
entry: flake8

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ google-api-python-client-stubs = "^1.17.0"

[tool.taskipy.tasks]
format = "isort . && black ."
lint = "flake8 --max-line-length 88 monopoly && pylint monopoly"
lint = "flake8 . && pylint monopoly"
test = "pytest -n auto"
ci = "poetry run task format && poetry run task lint && poetry run task test"

Expand Down
1 change: 0 additions & 1 deletion tests/integration/banks/ocbc/test_ocbc_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

from monopoly.bank import Statement
from monopoly.banks.ocbc import Ocbc
from monopoly.helpers.constants import ROOT_DIR
from monopoly.statement import Transaction


Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_check_trusted_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_trusted_user(message: Message):
message.payload = trusted_message
message.trusted_user_emails = trusted_user_emails

assert message.from_trusted_user == True
assert message.from_trusted_user


def test_untrusted_user(message: Message):
Expand All @@ -24,4 +24,4 @@ def test_untrusted_user(message: Message):
message.payload = untrusted_message
message.trusted_user_emails = trusted_user_emails

assert message.from_trusted_user == False
assert not message.from_trusted_user

0 comments on commit 2bb268d

Please sign in to comment.