Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add flake8 pre-commit hook #19

Merged
merged 1 commit into from
Oct 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 monopoly && 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