@@ -35,8 +35,12 @@ archive = ["asyncpg>=0.29"]
3535dev = [
3636 " pytest>=8.0" ,
3737 " pytest-asyncio>=0.24" ,
38+ " pytest-cov>=6.0" ,
3839 " respx>=0.20" ,
3940 " ruff>=0.8" ,
41+ " mypy>=1.13" ,
42+ " bandit>=1.8" ,
43+ " pip-audit>=2.7" ,
4044]
4145
4246[project .urls ]
@@ -50,13 +54,72 @@ packages = ["src/mina_sdk"]
5054[tool .ruff ]
5155target-version = " py38"
5256line-length = 100
57+ src = [" src" , " tests" ]
5358
5459[tool .ruff .lint ]
55- select = [" E" , " F" , " I" , " W" ]
60+ select = [
61+ " E" , # pycodestyle errors
62+ " F" , # pyflakes
63+ " I" , # isort
64+ " W" , # pycodestyle warnings
65+ " N" , # pep8-naming
66+ " UP" , # pyupgrade
67+ " B" , # flake8-bugbear
68+ " A" , # flake8-builtins
69+ " S" , # flake8-bandit (security)
70+ " T20" , # flake8-print
71+ " SIM" , # flake8-simplify
72+ " RUF" , # ruff-specific rules
73+ ]
74+ ignore = [
75+ " S101" , # allow assert in tests
76+ " T201" , # allow print in examples
77+ " A001" , # ConnectionError shadows builtin (fixed in quality PR)
78+ " A004" , # ConnectionError import shadows builtin (fixed in quality PR)
79+ " N818" , # CurrencyUnderflow naming (fixed in quality PR)
80+ " S105" , # false positive on "TOKEN" in query variable names
81+ " S311" , # random.randint not crypto-safe (Currency.random is not for crypto)
82+ ]
83+
84+ [tool .ruff .lint .per-file-ignores ]
85+ "tests/*" = [" S101" , " S106" ]
86+ "examples/*" = [" T201" ]
87+
88+ [tool .ruff .format ]
89+ quote-style = " double"
90+ indent-style = " space"
91+
92+ [tool .mypy ]
93+ python_version = " 3.10"
94+ warn_return_any = false
95+ warn_unused_configs = true
96+ disallow_untyped_defs = true
97+ check_untyped_defs = true
98+ ignore_missing_imports = true
5699
57100[tool .pytest .ini_options ]
58101testpaths = [" tests" ]
59102asyncio_mode = " auto"
60103markers = [
61104 " integration: requires a running Mina daemon (set MINA_GRAPHQL_URI)" ,
62105]
106+
107+ [tool .coverage .run ]
108+ source = [" mina_sdk" ]
109+ branch = true
110+
111+ [tool .coverage .report ]
112+ show_missing = true
113+ fail_under = 70
114+ exclude_lines = [
115+ " pragma: no cover" ,
116+ " if TYPE_CHECKING:" ,
117+ " if __name__" ,
118+ ]
119+
120+ [tool .bandit ]
121+ exclude_dirs = [" tests" ]
122+ skips = [
123+ " B105" , # false positive: "TOKEN" in GraphQL query variable names
124+ " B311" , # random.randint is fine for Currency.random (not crypto)
125+ ]
0 commit comments