@@ -50,11 +50,9 @@ test = [
5050 " pytest-pretty>=1.0.0,<2.0.0" ,
5151]
5252quality = [
53- " ruff==0.1.0" ,
54- " mypy==1.5.1" ,
55- " black==23.3.0" ,
56- " bandit[toml]>=1.7.0,<1.8.0" ,
57- " pre-commit>=2.17.0,<3.0.0" ,
53+ " ruff==0.1.9" ,
54+ " mypy==1.8.0" ,
55+ " pre-commit>=3.0.0,<4.0.0" ,
5856]
5957docs = [
6058 " sphinx>=3.0.0,!=3.5.0" ,
@@ -80,11 +78,9 @@ dev = [
8078 " pytest-xdist>=3.0.0,<4.0.0" ,
8179 " pytest-pretty>=1.0.0,<2.0.0" ,
8280 # style
83- " ruff==0.1.0" ,
84- " mypy==1.5.1" ,
85- " black==23.3.0" ,
86- " bandit[toml]>=1.7.0,<1.8.0" ,
87- " pre-commit>=2.17.0,<3.0.0" ,
81+ " ruff==0.1.9" ,
82+ " mypy==1.8.0" ,
83+ " pre-commit>=3.0.0,<4.0.0" ,
8884 # docs
8985 " sphinx>=3.0.0,!=3.5.0" ,
9086 " furo>=2022.3.4" ,
@@ -133,6 +129,16 @@ select = [
133129 " T20" , # flake8-print
134130 " PT" , # flake8-pytest-style
135131 " LOG" , # flake8-logging
132+ " SIM" , # flake8-simplify
133+ " YTT" , # flake8-2020
134+ " ANN" , # flake8-annotations
135+ " ASYNC" , # flake8-async
136+ " BLE" , # flake8-blind-except
137+ " A" , # flake8-builtins
138+ " ICN" , # flake8-import-conventions
139+ " PIE" , # flake8-pie
140+ " ARG" , # flake8-unused-arguments
141+ " FURB" , # refurb
136142]
137143ignore = [
138144 " E501" , # line too long, handled by black
@@ -142,20 +148,31 @@ ignore = [
142148 " F403" , # star imports
143149 " E731" , # lambda assignment
144150 " C416" , # list comprehension to list()
151+ " ANN101" , # missing type annotations on self
152+ " ANN102" , # missing type annotations on cls
153+ " ANN002" , # missing type annotations on *args
154+ " ANN003" , # missing type annotations on **kwargs
155+ " COM812" , # trailing comma missing
145156 " N812" , # lowercase imported as non-lowercase
157+ " ISC001" , # implicit string concatenation (handled by format)
158+ " ANN401" , # Dynamically typed expressions (typing.Any) are disallowed
146159]
147160exclude = [" .git" ]
148161line-length = 120
149162target-version = " py39"
150163preview = true
151164
165+ [tool .ruff .format ]
166+ quote-style = " double"
167+ indent-style = " space"
168+
152169[tool .ruff .per-file-ignores ]
153170"**/__init__.py" = [" I001" , " F401" , " CPY001" ]
154- "scripts/**.py" = [" D" , " T201" , " N812" ]
155- ".github/**.py" = [" D" , " T201" , " S602" ]
156- "docs/**.py" = [" E402" , " D103" ]
157- "tests/**.py" = [" D103" , " CPY001" , " S101" , " PT011" ,]
158- "demo/**.py" = [" D103" ]
171+ "scripts/**.py" = [" D" , " T201" , " N812" , " S101 " , " ANN " ]
172+ ".github/**.py" = [" D" , " T201" , " S602" , " S101 " , " ANN " ]
173+ "docs/**.py" = [" E402" , " D103" , " ANN " , " A001 " , " ARG001 " ]
174+ "tests/**.py" = [" D103" , " CPY001" , " S101" , " PT011" , " ANN " ]
175+ "demo/**.py" = [" D103" , " ANN " ]
159176"setup.py" = [" T201" ]
160177
161178[tool .ruff .flake8-quotes ]
@@ -177,18 +194,11 @@ no_implicit_optional = true
177194check_untyped_defs = true
178195implicit_reexport = false
179196disallow_untyped_defs = true
197+ explicit_package_bases = true
180198
181199[[tool .mypy .overrides ]]
182200module = [
183201 " PIL" ,
184202 " matplotlib"
185203]
186204ignore_missing_imports = true
187-
188- [tool .black ]
189- line-length = 120
190- target-version = [' py39' ]
191-
192- [tool .bandit ]
193- exclude_dirs = [" .github/collect_env.py" ]
194- skips = [" B101" ]
0 commit comments