Use Django-ninja for API
This commit is contained in:
parent
88c958ef12
commit
869a931bda
13 changed files with 355 additions and 432 deletions
|
|
@ -13,6 +13,7 @@ feedparser = "^6.0.11"
|
|||
gunicorn = "^21.2.0"
|
||||
dateparser = "^1.2.0"
|
||||
discord-webhook = "^1.3.1"
|
||||
django-ninja = "^1.1.0"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
ruff = "^0.3.0"
|
||||
|
|
@ -32,18 +33,19 @@ preview = true
|
|||
line-length = 120
|
||||
lint.select = ["ALL"]
|
||||
lint.ignore = [
|
||||
"CPY001", # Missing copyright notice at top of file
|
||||
"ERA001", # Found commented-out code
|
||||
"FIX002", # Line contains TODO
|
||||
"D100", # Checks for undocumented public module definitions.
|
||||
"D101", # Checks for undocumented public class definitions.
|
||||
"D102", # Checks for undocumented public method definitions.
|
||||
"D104", # Missing docstring in public package.
|
||||
"D105", # Missing docstring in magic method.
|
||||
"D106", # Checks for undocumented public class definitions, for nested classes.
|
||||
"COM812", # Checks for the absence of trailing commas.
|
||||
"ISC001", # Checks for implicitly concatenated strings on a single line.
|
||||
"PLR6301", # Checks for the presence of unused self parameter in methods definitions.
|
||||
"CPY001", # Missing copyright notice at top of file
|
||||
"ERA001", # Found commented-out code
|
||||
"FIX002", # Line contains TODO
|
||||
"D100", # Checks for undocumented public module definitions.
|
||||
"D101", # Checks for undocumented public class definitions.
|
||||
"D102", # Checks for undocumented public method definitions.
|
||||
"D104", # Missing docstring in public package.
|
||||
"D105", # Missing docstring in magic method.
|
||||
"D106", # Checks for undocumented public class definitions, for nested classes.
|
||||
"COM812", # Checks for the absence of trailing commas.
|
||||
"ISC001", # Checks for implicitly concatenated strings on a single line.
|
||||
"PLR6301", # Checks for the presence of unused self parameter in methods definitions.
|
||||
"ARG001", # Checks for the presence of unused arguments in function definitions.
|
||||
]
|
||||
|
||||
[tool.ruff.lint.pydocstyle]
|
||||
|
|
@ -51,12 +53,12 @@ convention = "google"
|
|||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"**/tests.py" = [
|
||||
"S101", # Allow asserts
|
||||
"ARG", # Allow unused arguments
|
||||
"FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
|
||||
"PLR2004", # Allow "assert response.status_code == 200" when testing views
|
||||
"D102", # Allow missing docstrings in tests
|
||||
"PLR6301", # Checks for the presence of unused self parameter in methods definitions.
|
||||
"S101", # Allow asserts
|
||||
"ARG", # Allow unused arguments
|
||||
"FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
|
||||
"PLR2004", # Allow "assert response.status_code == 200" when testing views
|
||||
"D102", # Allow missing docstrings in tests
|
||||
"PLR6301", # Checks for the presence of unused self parameter in methods definitions.
|
||||
]
|
||||
|
||||
[tool.djlint]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue