@@ -40,6 +40,46 @@ target-version = ['py37', 'py38', 'py39', 'py310']
40
40
# https://black.readthedocs.io/en/stable/usage_and_configuration/file_collection_and_discovery.html#gitignore
41
41
# Use `extend-exclude` if you want to exclude something in addition to this.
42
42
43
+ [tool .ruff ]
44
+ line-length = 88
45
+
46
+ # See https://github.com/charliermarsh/ruff/#pycodestyle
47
+ # for error codes. The ones we ignore are:
48
+ # E731: do not assign a lambda expression, use a def
49
+ # E501: Line too long (black enforces this for us)
50
+ #
51
+ # See https://github.com/charliermarsh/ruff/#pyflakes
52
+ # F401: unused import
53
+ # F811: Redefinition of unused
54
+ # F821: Undefined name
55
+ #
56
+ # flake8-bugbear compatible checks. Its error codes are described at
57
+ # https://github.com/charliermarsh/ruff/#flake8-bugbear
58
+ # B019: Use of functools.lru_cache or functools.cache on methods can lead to memory leaks
59
+ # B023: Functions defined inside a loop must not use variables redefined in the loop
60
+ # B024: Abstract base class with no abstract method.
61
+ ignore = [
62
+ " B019" ,
63
+ " B023" ,
64
+ " B024" ,
65
+ " E501" ,
66
+ " E731" ,
67
+ " F401" ,
68
+ " F811" ,
69
+ " F821" ,
70
+ ]
71
+ select = [
72
+ # pycodestyle checks.
73
+ " E" ,
74
+ " W" ,
75
+ # pyflakes checks.
76
+ " F" ,
77
+ # flake8-bugbear checks.
78
+ " B0" ,
79
+ # flake8-comprehensions checks.
80
+ " C4" ,
81
+ ]
82
+
43
83
[tool .isort ]
44
84
line_length = 88
45
85
sections = [" FUTURE" , " STDLIB" , " THIRDPARTY" , " TWISTED" , " FIRSTPARTY" , " TESTS" , " LOCALFOLDER" ]
@@ -274,12 +314,10 @@ all = [
274
314
]
275
315
276
316
[tool .poetry .dev-dependencies ]
277
- # # We pin black so that our tests don't start failing on new releases.
317
+ # We pin black so that our tests don't start failing on new releases.
278
318
isort = " >=5.10.1"
279
319
black = " >=22.3.0"
280
- flake8-comprehensions = " *"
281
- flake8-bugbear = " >=21.3.2"
282
- flake8 = " *"
320
+ ruff = " 0.0.189"
283
321
284
322
# Typechecking
285
323
mypy = " *"
0 commit comments