88# https://docs.astral.sh/ruff/configuration/
99line-length = 100
1010preview = true
11- required-version = " >=0.11.0" # tool.ruff.target-version is infered from project.requires-python
11+ required-version = " >=0.11.0" # tool.ruff.target-version is inferred from project.requires-python
1212
1313[format ]
1414docstring-code-format = true
@@ -20,7 +20,7 @@ ignore = [
2020 # ##
2121 # Not needed or wanted
2222 # ##
23- " D1" , # pydocstyle Missing doctring
23+ " D1" , # pydocstyle Missing docstring
2424 " D401" , # pydocstyle: non-imperative-mood
2525 " EM" , # flake8-errmsg
2626 # This is often something we can't control: https://github.com/astral-sh/ruff/issues/9497
@@ -47,6 +47,15 @@ ignore = [
4747 " D212" , # pydocstyle: multi-line-summary-first-line
4848 # Allow differentiating between broken (FIXME) and to be done/added/completed (TODO)
4949 " TD001" , # flake8-todos: invalid-todo-tag
50+ # Often just leads to redundant more verbose code when needing an actual str
51+ " PTH208" , # Use `pathlib.Path.iterdir()` instead.
52+ # Typeshed doesn't want complex or non-literal defaults for maintenance and testing reasons.
53+ # This doesn't affect us, let's have more complete stubs.
54+ # This doesn't affect us, let's have more complete stubs.
55+ " PYI011" , # typed-argument-default-in-stub
56+ " PYI011" , # typed-argument-default-in-stub
57+ " PYI014" , # argument-default-in-stub
58+ " PYI053" , # string-or-bytes-too-long
5059
5160 # ##
5261 # These should be warnings (https://github.com/astral-sh/ruff/issues/1256 & https://github.com/astral-sh/ruff/issues/1774)
@@ -57,6 +66,8 @@ ignore = [
5766
5867 # False-positives
5968 " TC004" , # https://github.com/astral-sh/ruff/issues/3821
69+ # Too many magic number "2" that are preferable inline. https://github.com/astral-sh/ruff/issues/10009
70+ " PLR2004" , # magic-value-comparison
6071
6172 # ##
6273 # Conflict with formatter (you can remove this section if you don't use Ruff as a formatter)
@@ -107,8 +118,6 @@ allow-multiline = false
107118[lint .isort ]
108119combine-as-imports = true
109120split-on-trailing-comma = false
110- # This should be automatically detected in src layout, but somehow pre-commit messes it up
111- known-first-party = [" gen" ]
112121
113122# https://docs.astral.sh/ruff/settings/#mccabe
114123[lint .mccabe ]
@@ -149,8 +158,8 @@ max-branches = 15
149158"cv2.imread".msg = """ \
150159it doesn't support special characters. \
151160Use `cv2.imdecode(np.fromfile(filename, dtype=np.uint8), flags)` instead.
152- https://github.com/opencv/opencv/issues/4292 #issuecomment-2266019697 """
161+ https://github.com/opencv/opencv/issues/18305 #issuecomment-2847972863 """
153162"cv2.imwrite".msg = """ \
154163it doesn't support special characters. \
155164Use `cv2.imencode(os.path.splitext(filename)[1], img)[1].tofile(filename)` instead.
156- https://github.com/opencv/opencv/issues/4292 #issuecomment-2266019697 """
165+ https://github.com/opencv/opencv/issues/18305 #issuecomment-2847972863 """
0 commit comments