summaryrefslogtreecommitdiff
path: root/pyproject.toml
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2023-03-15 14:42:11 -0400
committerJulian Berman <Julian@GrayVines.com>2023-03-15 14:42:11 -0400
commitdb1e18591333fa72c30fac3b7dfc7ef175612578 (patch)
treeebf4723b1870eb78ebd6e94ed518a177b1e7a44f /pyproject.toml
parent61bd0b18822bec24fdd3a15cdaba040d65781384 (diff)
downloadjsonschema-db1e18591333fa72c30fac3b7dfc7ef175612578.tar.gz
flake8 -> ruff, a mostly painless affair.
Diffstat (limited to 'pyproject.toml')
-rw-r--r--pyproject.toml53
1 files changed, 42 insertions, 11 deletions
diff --git a/pyproject.toml b/pyproject.toml
index f709c9f..859ff71 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -111,15 +111,46 @@ multi_line_output = 3
ignore_missing_imports = true
show_error_codes = true
-[tool.pydocstyle]
-match = "(?!(test_|_|compat|cli)).*\\.py" # see PyCQA/pydocstyle#323
-add-select = [
- "D410", # Trailing whitespace plz
-]
-add-ignore = [
- "D107", # Hah, no
- "D200", # 1-line docstrings don't need to be on one line
- "D202", # One line is fine.
- "D412", # Trailing whitespace plz
- "D413", # No trailing whitespace plz
+[tool.ruff]
+line-length = 79
+target-version = "py38"
+select = ["B", "D", "D204", "E", "F", "Q", "UP", "W"]
+ignore = [
+ # It's totally OK to call functions for default arguments.
+ "B008",
+ # raise SomeException(...) is fine.
+ "B904",
+ # It's fine to not have docstrings for magic methods.
+ "D105",
+ # __init__ especially doesn't need a docstring
+ "D107",
+ # This rule makes diffs uglier when expanding docstrings (and it's uglier)
+ "D200",
+ # No blank lines before docstrings.
+ "D203",
+ # Start docstrings on the second line.
+ "D212",
+ # This rule misses sassy docstrings ending with ! or ?.
+ "D400",
+ # Section headers should end with a colon not a newline
+ "D406",
+ # Underlines aren't needed
+ "D407",
+ # Plz spaces after section headers
+ "D412",
]
+extend-exclude = ["json"]
+
+[tool.ruff.flake8-quotes]
+docstring-quotes = "double"
+
+[tool.ruff.per-file-ignores]
+"docs/*" = ["D"]
+"jsonschema/cli.py" = ["D", "UP"]
+"jsonschema/_utils.py" = ["D"]
+"jsonschema/benchmarks/*" = ["D"]
+"jsonschema/tests/*" = ["D"]
+
+[tool.ruff.pyupgrade]
+# We support 3.8 + 3.9
+keep-runtime-typing = true