mirror of
https://github.com/Paillat-dev/pycord-reactive-views.git
synced 2026-01-02 01:06:18 +00:00
👷 Work in progress
This commit is contained in:
137
pyproject.toml
137
pyproject.toml
@@ -33,20 +33,144 @@ name = "pycord_reactive_views"
|
||||
[tool.ruff]
|
||||
line-length = 120
|
||||
target-version = "py311"
|
||||
select = ["E", "F", "I", "N", "W", "B", "C", "D"]
|
||||
ignore = ["D100", "D104", "D107"]
|
||||
|
||||
[tool.ruff.pydocstyle]
|
||||
convention = "google"
|
||||
fix = true
|
||||
|
||||
[tool.ruff.per-file-ignores]
|
||||
"__init__.py" = ["F401"]
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = ["ALL"]
|
||||
|
||||
ignore = [
|
||||
"C90", # mccabe
|
||||
"CPY", # flake8-copyright
|
||||
"EM", # flake8-errmsg
|
||||
"SLF", # flake8-self
|
||||
"ARG", # flake8-unused-arguments
|
||||
"TD", # flake8-todos
|
||||
"FIX", # flake8-fixme
|
||||
"PD", # pandas-vet
|
||||
|
||||
"D100", # Missing docstring in public module
|
||||
"D104", # Missing docstring in public package
|
||||
"D105", # Missing docstring in magic method
|
||||
"D106", # Missing docstring in public nested class
|
||||
"D107", # Missing docstring in __init__
|
||||
"D203", # Blank line required before class docstring
|
||||
"D213", # Multi-line summary should start at the second line (incompatible with D212)
|
||||
"D301", # Use r""" if any backslashes in a docstring
|
||||
"D401", # First line of docstring should be in imperative mood
|
||||
"D404", # First word of the docstring should not be "This"
|
||||
"D405", # Section name should be properly capitalized
|
||||
"D406", # Section name should end with a newline
|
||||
"D407", # Missing dashed underline after section
|
||||
"D408", # Section underline should be in the line following the section's name
|
||||
"D409", # Section underline should match the length of its name
|
||||
"D410", # Missing blank line after section
|
||||
"D411", # Missing blank line before section
|
||||
"D412", # No blank lines allowed between a section header and its content
|
||||
"D413", # Missing blank line after last section
|
||||
"D414", # Section has no content
|
||||
"D416", # Section name should end with a colon
|
||||
"D417", # Missing argument description in the docstring
|
||||
|
||||
"ANN101", # Missing type annotation for self in method
|
||||
"ANN102", # Missing type annotation for cls in classmethod
|
||||
"ANN204", # Missing return type annotation for special method
|
||||
"ANN401", # Dynamically typed expressions (typing.Any) disallowed
|
||||
|
||||
"SIM102", # use a single if statement instead of nested if statements
|
||||
"SIM108", # Use ternary operator {contents} instead of if-else-block
|
||||
|
||||
"G001", # Logging statement uses str.format
|
||||
"G004", # Logging statement uses f-string
|
||||
"G003", # Logging statement uses +
|
||||
|
||||
"B904", # Raise without `from` within an `except` clause
|
||||
|
||||
"UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)`
|
||||
"PLR2004", # Using unnamed numerical constants
|
||||
"PGH003", # Using specific rule codes in type ignores
|
||||
"E731", # Don't asign a lambda expression, use a def
|
||||
"S311", # Use `secrets` for random number generation, not `random`
|
||||
"TRY003", # Avoid specifying long messages outside the exception class
|
||||
|
||||
# Redundant rules with ruff-format:
|
||||
"E111", # Indentation of a non-multiple of 4 spaces
|
||||
"E114", # Comment with indentation of a non-multiple of 4 spaces
|
||||
"E117", # Cheks for over-indented code
|
||||
"D206", # Checks for docstrings indented with tabs
|
||||
"D300", # Checks for docstring that use ''' instead of """
|
||||
"Q000", # Checks of inline strings that use wrong quotes (' instead of ")
|
||||
"Q001", # Multiline string that use wrong quotes (''' instead of """)
|
||||
"Q002", # Checks for docstrings that use wrong quotes (''' instead of """)
|
||||
"Q003", # Checks for avoidable escaped quotes ("\"" -> '"')
|
||||
"COM812", # Missing trailing comma (in multi-line lists/tuples/...)
|
||||
"COM819", # Prohibited trailing comma (in single-line lists/tuples/...)
|
||||
"ISC001", # Single line implicit string concatenation ("hi" "hey" -> "hihey")
|
||||
"ISC002", # Multi line implicit string concatenation
|
||||
|
||||
"DOC501"
|
||||
]
|
||||
|
||||
[tool.ruff.lint.isort]
|
||||
order-by-type = false
|
||||
case-sensitive = true
|
||||
combine-as-imports = true
|
||||
|
||||
# Redundant rules with ruff-format
|
||||
force-single-line = false # forces all imports to appear on their own line
|
||||
force-wrap-aliases = false # Split imports with multiple members and at least one alias
|
||||
lines-after-imports = -1 # The number of blank lines to place after imports
|
||||
lines-between-types = 0 # Number of lines to place between "direct" and import from imports
|
||||
split-on-trailing-comma = false # if last member of multiline import has a comma, don't fold it to single line
|
||||
|
||||
[tool.ruff.lint.pylint]
|
||||
max-args = 15
|
||||
max-branches = 15
|
||||
max-locals = 15
|
||||
max-nested-blocks = 5
|
||||
max-returns = 8
|
||||
max-statements = 75
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"tests/**.py" = [
|
||||
"ANN", # annotations
|
||||
"D", # docstrings
|
||||
"S101", # Use of assert
|
||||
]
|
||||
".github/scripts/**.py" = [
|
||||
"INP001", # Implicit namespace package
|
||||
]
|
||||
"alembic-migrations/env.py" = [
|
||||
"INP001", # Implicit namespace package
|
||||
]
|
||||
"alembic-migrations/versions/*" = [
|
||||
"INP001", # Implicit namespace package
|
||||
"D103", # Missing docstring in public function
|
||||
"D400", # First line should end with a period
|
||||
"D415", # First line should end with a period, question mark, or exclamation point
|
||||
]
|
||||
|
||||
[tool.ruff.format]
|
||||
line-ending = "lf"
|
||||
|
||||
[tool.basedpyright]
|
||||
include = ["src"]
|
||||
exclude = ["**/__pycache__"]
|
||||
venv = "env311"
|
||||
pythonVersion = "3.11"
|
||||
pythonPlatform = "All"
|
||||
pythonVersion = "3.12"
|
||||
typeCheckingMode = "all"
|
||||
|
||||
reportAny = false
|
||||
reportUnusedCallResult = false
|
||||
|
||||
reportUnknownArgumentType = false
|
||||
reportUnknownVariableType = false
|
||||
reportUnknownMemberType = false
|
||||
reportUnknownParameterType = false
|
||||
reportUnknownLambdaType = false
|
||||
|
||||
[tool.pdm]
|
||||
distribution = true
|
||||
@@ -54,6 +178,7 @@ distribution = true
|
||||
dev = [
|
||||
"basedpyright>=1.15.0",
|
||||
"ruff>=0.5.5",
|
||||
"python-dotenv>=1.0.1",
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user