Skip to content

Commit c48db09

Browse files
Move Ruff configuration from pyproject.toml to ruff.toml (#1592)
* Initial plan * Move Ruff configuration from pyproject.toml to ruff.toml Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/78a80ff3-cb8b-42a8-9822-2ab92bf43ade Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
1 parent 87fbdd0 commit c48db09

2 files changed

Lines changed: 48 additions & 50 deletions

File tree

pyproject.toml

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -107,56 +107,6 @@ required-version = ">=0.9.9" # Sync with README
107107
default-groups = [ "test", "dev", "doc" ]
108108
link-mode = "symlink"
109109

110-
[tool.ruff]
111-
line-length = 88
112-
113-
format.docstring-code-format = true
114-
115-
lint.select = [
116-
"A",
117-
"ARG",
118-
"B",
119-
"C4",
120-
"D",
121-
"E4",
122-
"E7",
123-
"E9",
124-
"EM",
125-
"ERA",
126-
"F",
127-
"FIX002",
128-
"FLY",
129-
"FURB",
130-
"I",
131-
"INP",
132-
"PLC0415",
133-
"PLE",
134-
"PLR",
135-
"PT",
136-
"RUF",
137-
"S",
138-
"SIM",
139-
"TC",
140-
"TID",
141-
"UP",
142-
]
143-
lint.ignore = [ "PLR2004", "S101", "SIM108" ]
144-
lint.per-file-ignores."!tests/**/*.py" = [ "ARG002", "PT" ]
145-
lint.per-file-ignores."hooks/**" = [ "D", "INP001" ]
146-
lint.per-file-ignores."src/usethis/_ui/interface/**/*.py" = [ "PLR0913", "TC001" ]
147-
lint.per-file-ignores."tests/**" = [ "D", "INP", "S603", "TC" ]
148-
lint.flake8-bugbear.extend-immutable-calls = [ "typer.Argument", "typer.Option" ]
149-
lint.flake8-builtins.strict-checking = true
150-
lint.flake8-tidy-imports.banned-api."functools.singledispatch".msg = "Use if-branch isinstance logic instead of singledispatch."
151-
lint.flake8-tidy-imports.banned-api."functools.singledispatchmethod".msg = "Use if-branch isinstance logic instead of singledispatchmethod."
152-
lint.flake8-tidy-imports.banned-api."typer.testing.CliRunner".msg = "Use `usethis._test.CliRunner` instead of `typer.CliRunner`."
153-
lint.flake8-type-checking.quote-annotations = true
154-
lint.flake8-type-checking.runtime-evaluated-base-classes = [ "pydantic.BaseModel" ]
155-
lint.flake8-type-checking.runtime-evaluated-decorators = [ "typer.Typer.command" ]
156-
lint.flake8-type-checking.strict = true
157-
lint.pydocstyle.convention = "google"
158-
lint.future-annotations = true
159-
160110
[tool.codespell]
161111
skip = [ "site" ]
162112
ignore-words-list = [ "edn" ]

ruff.toml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
line-length = 88
2+
3+
format.docstring-code-format = true
4+
5+
lint.select = [
6+
"A",
7+
"ARG",
8+
"B",
9+
"C4",
10+
"D",
11+
"E4",
12+
"E7",
13+
"E9",
14+
"EM",
15+
"ERA",
16+
"F",
17+
"FIX002",
18+
"FLY",
19+
"FURB",
20+
"I",
21+
"INP",
22+
"PLC0415",
23+
"PLE",
24+
"PLR",
25+
"PT",
26+
"RUF",
27+
"S",
28+
"SIM",
29+
"TC",
30+
"TID",
31+
"UP",
32+
]
33+
lint.ignore = [ "PLR2004", "S101", "SIM108" ]
34+
lint.per-file-ignores."!tests/**/*.py" = [ "ARG002", "PT" ]
35+
lint.per-file-ignores."hooks/**" = [ "D", "INP001" ]
36+
lint.per-file-ignores."src/usethis/_ui/interface/**/*.py" = [ "PLR0913", "TC001" ]
37+
lint.per-file-ignores."tests/**" = [ "D", "INP", "S603", "TC" ]
38+
lint.flake8-bugbear.extend-immutable-calls = [ "typer.Argument", "typer.Option" ]
39+
lint.flake8-builtins.strict-checking = true
40+
lint.flake8-tidy-imports.banned-api."functools.singledispatch".msg = "Use if-branch isinstance logic instead of singledispatch."
41+
lint.flake8-tidy-imports.banned-api."functools.singledispatchmethod".msg = "Use if-branch isinstance logic instead of singledispatchmethod."
42+
lint.flake8-tidy-imports.banned-api."typer.testing.CliRunner".msg = "Use `usethis._test.CliRunner` instead of `typer.CliRunner`."
43+
lint.flake8-type-checking.quote-annotations = true
44+
lint.flake8-type-checking.runtime-evaluated-base-classes = [ "pydantic.BaseModel" ]
45+
lint.flake8-type-checking.runtime-evaluated-decorators = [ "typer.Typer.command" ]
46+
lint.flake8-type-checking.strict = true
47+
lint.pydocstyle.convention = "google"
48+
lint.future-annotations = true

0 commit comments

Comments
 (0)