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
apply Flake8 and add it to CI #303
Conversation
… is intended, start the name with an underscore.
@@ -30,7 +31,8 @@ APScheduler = "*" | |||
redis = "*" | |||
matplotlib = "*" | |||
|
|||
[tool.poetry.dev-dependencies] | |||
[tool.poetry.group.dev.dependencies] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated to newer style of poetry
ref: https://python-poetry.org/docs/managing-dependencies/#adding-a-dependency-to-a-group
[tool.flake8] | ||
# B006: Do not use mutable data structures for argument defaults. They are created during function definition time. All calls to the function reuse this one instance of that data structure, persisting changes between them. | ||
# B008 Do not perform function calls in argument defaults. The call is performed only once at function definition time. All calls to your function will reuse the result of that definition-time function call. If this is intended, assign the function call to a module-level variable and use that variable as a default value. | ||
ignore = "B006,B008" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[comment]
I would like to ignore these two error codes currently because it will need huge effort for refactoring. Maybe fixed in next PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
B006 might be able to avoid potential bugs. Looking forward to consequent PRs :)
@@ -30,7 +31,8 @@ APScheduler = "*" | |||
redis = "*" | |||
matplotlib = "*" | |||
|
|||
[tool.poetry.dev-dependencies] | |||
[tool.poetry.group.dev.dependencies] | |||
pyproject-flake8 = "5.0.4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[discussion]
This version constraint comes from that flake8 > 6.0.0 needs python 3.8.1+. Can we go python 3.8.1+ ?
PyCQA/flake8#1741
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hirosassa We may proceed to 3.8.1+, but would prefer another PR.
@hirosassa Thank you for cool refactoring! |
SSIA
I applied
flake8
to gokart.I separated commit for each flake8 error code.
Plz review.