Skip to content

Commit

Permalink
Add compatibility with Flake8 6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenlind committed Nov 24, 2022
1 parent 71ac99b commit 84e3d36
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
23 changes: 16 additions & 7 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
[flake8]
max-line-length=88
ignore=
E203, # Whitespace before ‘:’
W503, # Line break before binary operator
ANN101, # Missing type annotation for self in method
ANN102, # Missing type annotation for cls in classmethod
E741, # Allow variable names I, O and l (but I and O still prevented by pylint)
ANN401, # Allow using the Any type hint
E501, # Too long lines, handled by Pylint
# Missing type annotation for self in method
ANN101,
# Missing type annotation for cls in classmethod
ANN102,
# Allow using the Any type hint
ANN401,
# Whitespace before ‘:’
E203,
# Similar to Pylint line-too-long but Pylint can ignore string literals
E501,
# Allow variable names I, O and l (but I and O still prevented by pylint)
E741,
# Allow not prefixing fixtures that do not return anything with '_'
PT004,
# Line break before binary operator
W503,
exclude=
.git,
__pycache__,
Expand Down
6 changes: 3 additions & 3 deletions flake8_plus/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def add_options(option_manager: OptionManager) -> None: # pragma: no cover
"""Add custom configuration option(s) to flake8."""
option_manager.add_option(
"--blanks-before-imports",
type="int",
type=int,
metavar="n",
default=defaults.BLANKS_BEFORE_IMPORTS,
parse_from_config=True,
Expand All @@ -65,7 +65,7 @@ def add_options(option_manager: OptionManager) -> None: # pragma: no cover

option_manager.add_option(
"--blanks-before-return",
type="int",
type=int,
metavar="n",
default=defaults.BLANKS_BEFORE_RETURN,
parse_from_config=True,
Expand All @@ -75,7 +75,7 @@ def add_options(option_manager: OptionManager) -> None: # pragma: no cover

option_manager.add_option(
"--blanks-before-except",
type="int",
type=int,
metavar="n",
default=defaults.BLANKS_BEFORE_EXCEPT,
parse_from_config=True,
Expand Down

0 comments on commit 84e3d36

Please sign in to comment.