Skip to content

Commit 8a9047d

Browse files
Moe botjtpavlock
Moe bot
authored andcommitted
build: upgrade lint dependencies
1 parent 8d95017 commit 8a9047d

File tree

5 files changed

+27
-16
lines changed

5 files changed

+27
-16
lines changed

moe/library/extra.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,11 @@ def __repr__(self):
157157
for field in self.fields - omit_fields:
158158
if hasattr(self, field):
159159
field_reprs.append(f"{field}={getattr(self, field)!r}")
160-
repr_str = "Extra(" + ", ".join(field_reprs) + f", album='{self.album}'"
160+
repr_str = (
161+
"Extra("
162+
+ ", ".join(field_reprs)
163+
+ f", album='{self.album}'" # noqa: B907 album repr is too long
164+
)
161165

162166
custom_field_reprs = []
163167
for custom_field, value in self.custom.items():

moe/library/track.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def __repr__(self):
254254
repr_str = (
255255
f"{type(self).__name__}("
256256
+ ", ".join(field_reprs)
257-
+ f", album='{self.album}'"
257+
+ f", album='{self.album}'" # noqa: B907 album repr is too long
258258
)
259259

260260
custom_field_reprs = []

moe/move/move_core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def _lazy_fstr_item(template: str, lib_item: LibItem) -> str:
187187
for func in funcs:
188188
globals()[func.__name__] = func
189189

190-
return eval(f'f"""{template}"""')
190+
return eval(f'f"""{template}"""') # noqa: B907
191191

192192

193193
def _sanitize_path_part(path_part: str) -> str:

pyproject.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,20 @@ pytest-cov = "^4.0.0"
3636
tox = "^4.0.0"
3737

3838
[tool.poetry.group.lint.dependencies]
39-
black = "^22.6.0"
40-
commitizen = "^2.17.12"
39+
black = "^23.0.0"
40+
commitizen = "^3.0.0"
4141
darglint = "^1.8.1"
42-
flake8 = "^5.0.4"
43-
flake8-alphabetize = "^0.0.17"
44-
flake8-bugbear = "^22.7.1"
42+
flake8 = "^6.0.0"
43+
flake8-alphabetize = "^0.0.19"
44+
flake8-bugbear = "^23.0.0"
4545
flake8-comprehensions = "^3.10.0"
4646
flake8-docstrings = "^1.5.0"
4747
flake8-pytest-style = "^1.6.0"
4848
flake8-use-fstring = "^1.1"
4949
"github3.py" = "^3.2.0"
5050
isort = "^5.10.1"
5151
mccabe = "^0.7.0"
52-
pre-commit = "^2.6.0"
52+
pre-commit = "^3.0.0"
5353
pyright = "^1.1.267"
5454

5555
[tool.poetry.group.docs.dependencies]

setup.cfg

+14-7
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,29 @@ select =
2121
PT, # pytest style
2222
W6, # pycodestyle deprecation warnings
2323
ignore =
24-
PT001, # allow `@pytest.fixture` (no parens)
25-
PT023, # allow `@pytest.mark.foo` (no parens)
26-
B950, # bug-bear line length; just use flake8 line length limit
27-
E203, # whitespace before ':' (black conflict)
28-
DAR402, # Excess exceptions in "Raises" (I like to document sub-private-methods)
29-
E266, # too many leading '#' for block comment
24+
# allow `@pytest.fixture` (no parens)
25+
PT001,
26+
# allow `@pytest.mark.foo` (no parens)
27+
PT023,
28+
# bug-bear line length; just use flake8 line length limit
29+
B950,
30+
# whitespace before ':' (black conflict)
31+
E203,
32+
# Excess exceptions in "Raises" (I like to document sub-private-methods)
33+
DAR402,
34+
# too many leading '#' for block comment
35+
E266,
3036
per-file-ignores =
3137
# E800: config file has commented out code as examples
3238
alembic/env.py:E800
3339
# D1: database migrations don't need docstrings
3440
# I: isort errors tend to misinterpret alembic as a local package
3541
alembic/versions/*.py:D1,I
42+
# B907: manually specified quotes are usually intentional for testing purposes
3643
# C901: don't check complexity for tests
3744
# DAR101: pytest uses fixtures as arguments, documenting each use is unnecessary
3845
# DAR102: factory arguments with fixtures can be weird
39-
tests/*:C901,DAR101,DAR102
46+
tests/*:B907,C901,DAR101,DAR102
4047
# F401: import unused
4148
# F403: allow * imports (used for packaging in some cases)
4249
*/__init__.py:F401,F403

0 commit comments

Comments
 (0)