@@ -38,3 +38,83 @@ features = ["pyo3/extension-module"]
3838homepage = " https://github.com/qaspen-python/psqlpy"
3939repository = " https://github.com/qaspen-python/psqlpy"
4040documentation = " https://github.com/qaspen-python/psqlpy/blob/main/README.md"
41+
42+ [tool .isort ]
43+ profile = " black"
44+ multi_line_output = 3
45+
46+ [tool .mypy ]
47+ strict = true
48+ mypy_path = " python"
49+ ignore_missing_imports = true
50+ allow_subclassing_any = true
51+ allow_untyped_calls = true
52+ pretty = true
53+ show_error_codes = true
54+ implicit_reexport = true
55+ allow_untyped_decorators = true
56+ warn_return_any = false
57+ warn_unused_ignores = false
58+
59+ [tool .ruff ]
60+ # List of enabled rulsets.
61+ # See https://docs.astral.sh/ruff/rules/ for more information.
62+ select = [
63+ " E" , # Error
64+ " F" , # Pyflakes
65+ " W" , # Pycodestyle
66+ " C90" , # McCabe complexity
67+ " N" , # pep8-naming
68+ " D" , # Pydocstyle
69+ " ANN" , # Pytype annotations
70+ " S" , # Bandit
71+ " B" , # Bugbear
72+ " COM" , # Commas
73+ " C4" , # Comprehensions
74+ " ISC" , # Implicit string concat
75+ " PIE" , # Unnecessary code
76+ " T20" , # Catch prints
77+ " PYI" , # validate pyi files
78+ " Q" , # Checks for quotes
79+ " RSE" , # Checks raise statements
80+ " RET" , # Checks return statements
81+ " SLF" , # Self checks
82+ " SIM" , # Simplificator
83+ " PTH" , # Pathlib checks
84+ " ERA" , # Checks for commented out code
85+ " PL" , # PyLint checks
86+ " RUF" , # Specific to Ruff checks
87+ ]
88+ ignore = [
89+ " D105" , # Missing docstring in magic method
90+ " D107" , # Missing docstring in __init__
91+ " D211" , # No blank lines allowed before class docstring
92+ " D212" , # Multi-line docstring summary should start at the first line
93+ " D401" , # First line should be in imperative mood
94+ " D104" , # Missing docstring in public package
95+ " D100" , # Missing docstring in public module
96+ " ANN102" , # Missing type annotation for self in method
97+ " ANN101" , # Missing type annotation for argument
98+ " ANN401" , # typing.Any are disallowed in `**kwargs
99+ " PLR0913" , # Too many arguments for function call
100+ " D106" , # Missing docstring in public nested class
101+ ]
102+ exclude = [" .venv/" ]
103+ mccabe = { max-complexity = 10 }
104+ line-length = 88
105+
106+ [tool .ruff .per-file-ignores ]
107+ "python/psqlpy/*" = [" PYI021" ]
108+ "python/tests/*" = [
109+ " S101" , # Use of assert detected
110+ " S608" , # Possible SQL injection vector through string-based query construction
111+ " D103" , # Missing docstring in public function
112+ " S311" , # Standard pseudo-random generators are not suitable for security/cryptographic purposes
113+ ]
114+
115+ [tool .ruff .pydocstyle ]
116+ convention = " pep257"
117+ ignore-decorators = [" typing.overload" ]
118+
119+ # [tool.ruff.pylint]
120+ # allow-magic-value-types = ["int", "str", "float", "tuple"]
0 commit comments