Quellcode durchsuchen

feat: merge ruff.toml into pyproject.toml

trgiangdo vor 1 Jahr
Ursprung
Commit
37e97dce76
2 geänderte Dateien mit 58 neuen und 56 gelöschten Zeilen
  1. 58 0
      pyproject.toml
  2. 0 56
      ruff.toml

+ 58 - 0
pyproject.toml

@@ -1,3 +1,61 @@
+[tool.ruff]
+exclude = [
+    ".git",
+    "__pycache__",
+    "setup.py",
+    "build",
+    "dist",
+    "releases",
+    ".venv",
+    ".tox",
+    ".mypy_cache",
+    ".pytest_cache",
+    ".vscode",
+    ".github",
+]
+line-length = 120
+indent-width = 4
+ignore-init-module-imports = true
+
+[tool.ruff.lint]
+select = [
+    "E",  # pycodestyle errors
+    "F",  # pyflakes errors
+    "W",  # pycodestyle warnings
+    "C",  # mccabe complexity checker
+    "B",  # bugbear best practices checker
+    "T",  # mypy type errors
+    "B", # flake8-bugbear best practices checker
+    "I001", # isort import order
+]
+ignore = [
+    "E203",  # whitespace before ':'
+    "E722",  # do not use bare except
+    "C401",  # Unnecessary generator (rewrite as a `set` comprehension)
+    "C405",  # Unnecessary list literal - rewrite as a literal
+    "C408",  # Unnecessary dict call - rewrite as a literal
+    "C409",  # Unnecessary list passed to tuple() - rewrite as a tuple literal
+    "C416",  # Unnecessary `set` comprehension (rewrite using `set()`)
+]
+
+# Allow fix for all enabled rules (when `--fix`) is provided.
+fixable = ["ALL"]
+unfixable = []
+
+[tool.ruff.lint.per-file-ignores]
+"__init__.py" = ["F401", "F403"]  # unused import
+"_init.py" = ["F401", "F403"]  # unused import
+"taipy/config/stubs/pyi_header.py" = ["F401", "F403"]  # unused import
+"taipy/templates/*" = ["F401", "F403", "T201"]  # unused import, `print` found
+"tests/*" = ["T201"]  # `print` found
+"tools/*" = ["T201"]  # `print` found
+
+[tool.ruff.lint.mccabe]
+max-complexity = 18
+
+[tool.ruff.lint.pydocstyle]
+convention = "google"
+
 [tool.pyright]
 
 [tool.codespell]

+ 0 - 56
ruff.toml

@@ -1,56 +0,0 @@
-exclude = [
-    ".git",
-    "__pycache__",
-    "setup.py",
-    "build",
-    "dist",
-    "releases",
-    ".venv",
-    ".tox",
-    ".mypy_cache",
-    ".pytest_cache",
-    ".vscode",
-    ".github",
-]
-line-length = 120
-indent-width = 4
-ignore-init-module-imports = true
-
-[lint]
-select = [
-    "E",  # pycodestyle errors
-    "F",  # pyflakes errors
-    "W",  # pycodestyle warnings
-    "C",  # mccabe complexity checker
-    "B",  # bugbear best practices checker
-    "T",  # mypy type errors
-    "B", # flake8-bugbear best practices checker
-    "I001", # isort import order
-]
-ignore = [
-    "E203",  # whitespace before ':'
-    "E722",  # do not use bare except
-    "C401",  # Unnecessary generator (rewrite as a `set` comprehension)
-    "C405",  # Unnecessary list literal - rewrite as a literal
-    "C408",  # Unnecessary dict call - rewrite as a literal
-    "C409",  # Unnecessary list passed to tuple() - rewrite as a tuple literal
-    "C416",  # Unnecessary `set` comprehension (rewrite using `set()`)
-]
-
-# Allow fix for all enabled rules (when `--fix`) is provided.
-fixable = ["ALL"]
-unfixable = []
-
-[lint.per-file-ignores]
-"__init__.py" = ["F401", "F403"]  # unused import
-"_init.py" = ["F401", "F403"]  # unused import
-"taipy/config/stubs/pyi_header.py" = ["F401", "F403"]  # unused import
-"taipy/templates/*" = ["F401", "F403", "T201"]  # unused import, `print` found
-"tests/*" = ["T201"]  # `print` found
-"tools/*" = ["T201"]  # `print` found
-
-[lint.mccabe]
-max-complexity = 18
-
-[pydocstyle]
-convention = "google"