-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adopt ruff formatter and linter (#2)
* update poetry configuration to new format * adopt ruff formatter and linter * remove invalid rule selector `W503` * remove obsolete lint script
- Loading branch information
Showing
4 changed files
with
63 additions
and
138 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,21 +2,23 @@ | |
name = "djantic2" | ||
version = "1.0.1" | ||
description = "Pydantic models for Django" | ||
authors = ["Jonathan Sundqvist <[email protected]>", "Jordan Eremieff <[email protected]>"] | ||
authors = [ | ||
"Jonathan Sundqvist <[email protected]>", | ||
"Jordan Eremieff <[email protected]>", | ||
] | ||
license = "MIT" | ||
packages = [{include = "djantic"}] | ||
packages = [{ include = "djantic" }] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.8" | ||
pydantic = "^2.6.2" | ||
Django = ">3,<6" | ||
|
||
[tool.poetry.dev-dependencies] | ||
black = "^24.2.0" | ||
[tool.poetry.group.dev.dependencies] | ||
ruff = "^0.3.7" | ||
setuptools = "^65.5.1" | ||
twine = "^3.4.1" | ||
wheel = "^0.38.1" | ||
flake8 = "^3.9.2" | ||
mypy = "^0.910" | ||
pytest = "^6.2.4" | ||
pytest-cov = "^2.12.1" | ||
|
@@ -33,6 +35,32 @@ psycopg2-binary = "^2.9.1" | |
bump2version = "^1.0.1" | ||
factory-boy = "^3.2.1" | ||
|
||
|
||
[tool.ruff] | ||
line-length = 88 | ||
exclude = ['.git', '__pycache__', '__init__.py', '.mypy_cache', '.pytest_cache'] | ||
lint.select = [ | ||
"E", # pycodestyle errors | ||
"W", # pycodestyle warnings | ||
"F", # pyflakes | ||
"I", # isort | ||
"C", # flake8-comprehensions | ||
"B", # flake8-bugbear | ||
"UP", # pyupgrade | ||
] | ||
lint.ignore = [ | ||
"E501", # line too long | ||
"C901", # Comprehension is too complex (11 > 10) | ||
"W191", # indentation contains tabs | ||
"E402", | ||
"E203", | ||
] | ||
|
||
[tool.ruff.lint.pyupgrade] | ||
# Preserve types, even if a file imports `from __future__ import annotations`. | ||
keep-runtime-typing = true | ||
|
||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters