Skip to content

Commit

Permalink
build: upgrade lint dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Moe bot authored and jtpavlock committed May 21, 2023
1 parent 8d95017 commit 8a9047d
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 16 deletions.
6 changes: 5 additions & 1 deletion moe/library/extra.py
Expand Up @@ -157,7 +157,11 @@ def __repr__(self):
for field in self.fields - omit_fields:
if hasattr(self, field):
field_reprs.append(f"{field}={getattr(self, field)!r}")
repr_str = "Extra(" + ", ".join(field_reprs) + f", album='{self.album}'"
repr_str = (
"Extra("
+ ", ".join(field_reprs)
+ f", album='{self.album}'" # noqa: B907 album repr is too long
)

custom_field_reprs = []
for custom_field, value in self.custom.items():
Expand Down
2 changes: 1 addition & 1 deletion moe/library/track.py
Expand Up @@ -254,7 +254,7 @@ def __repr__(self):
repr_str = (
f"{type(self).__name__}("
+ ", ".join(field_reprs)
+ f", album='{self.album}'"
+ f", album='{self.album}'" # noqa: B907 album repr is too long
)

custom_field_reprs = []
Expand Down
2 changes: 1 addition & 1 deletion moe/move/move_core.py
Expand Up @@ -187,7 +187,7 @@ def _lazy_fstr_item(template: str, lib_item: LibItem) -> str:
for func in funcs:
globals()[func.__name__] = func

return eval(f'f"""{template}"""')
return eval(f'f"""{template}"""') # noqa: B907


def _sanitize_path_part(path_part: str) -> str:
Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Expand Up @@ -36,20 +36,20 @@ pytest-cov = "^4.0.0"
tox = "^4.0.0"

[tool.poetry.group.lint.dependencies]
black = "^22.6.0"
commitizen = "^2.17.12"
black = "^23.0.0"
commitizen = "^3.0.0"
darglint = "^1.8.1"
flake8 = "^5.0.4"
flake8-alphabetize = "^0.0.17"
flake8-bugbear = "^22.7.1"
flake8 = "^6.0.0"
flake8-alphabetize = "^0.0.19"
flake8-bugbear = "^23.0.0"
flake8-comprehensions = "^3.10.0"
flake8-docstrings = "^1.5.0"
flake8-pytest-style = "^1.6.0"
flake8-use-fstring = "^1.1"
"github3.py" = "^3.2.0"
isort = "^5.10.1"
mccabe = "^0.7.0"
pre-commit = "^2.6.0"
pre-commit = "^3.0.0"
pyright = "^1.1.267"

[tool.poetry.group.docs.dependencies]
Expand Down
21 changes: 14 additions & 7 deletions setup.cfg
Expand Up @@ -21,22 +21,29 @@ select =
PT, # pytest style
W6, # pycodestyle deprecation warnings
ignore =
PT001, # allow `@pytest.fixture` (no parens)
PT023, # allow `@pytest.mark.foo` (no parens)
B950, # bug-bear line length; just use flake8 line length limit
E203, # whitespace before ':' (black conflict)
DAR402, # Excess exceptions in "Raises" (I like to document sub-private-methods)
E266, # too many leading '#' for block comment
# allow `@pytest.fixture` (no parens)
PT001,
# allow `@pytest.mark.foo` (no parens)
PT023,
# bug-bear line length; just use flake8 line length limit
B950,
# whitespace before ':' (black conflict)
E203,
# Excess exceptions in "Raises" (I like to document sub-private-methods)
DAR402,
# too many leading '#' for block comment
E266,
per-file-ignores =
# E800: config file has commented out code as examples
alembic/env.py:E800
# D1: database migrations don't need docstrings
# I: isort errors tend to misinterpret alembic as a local package
alembic/versions/*.py:D1,I
# B907: manually specified quotes are usually intentional for testing purposes
# C901: don't check complexity for tests
# DAR101: pytest uses fixtures as arguments, documenting each use is unnecessary
# DAR102: factory arguments with fixtures can be weird
tests/*:C901,DAR101,DAR102
tests/*:B907,C901,DAR101,DAR102
# F401: import unused
# F403: allow * imports (used for packaging in some cases)
*/__init__.py:F401,F403

0 comments on commit 8a9047d

Please sign in to comment.