Skip to content

Commit 7192416

Browse files
committed
add mypy and ruff
1 parent 12e6504 commit 7192416

3 files changed

Lines changed: 139 additions & 17 deletions

File tree

DictDataBase.code-workspace

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@
77
"settings": {
88
"[python]": {
99
"editor.formatOnSave": true,
10-
"editor.defaultFormatter": "charliermarsh.ruff"
11-
},
12-
"editor.codeActionsOnSave": {
13-
"source.organizeImports": "explicit"
10+
"editor.defaultFormatter": "charliermarsh.ruff",
11+
"editor.codeActionsOnSave": {
12+
"source.fixAll": "never",
13+
"source.organizeImports": "explicit",
14+
},
1415
},
16+
"python.analysis.typeCheckingMode": "standard",
17+
"python.analysis.diagnosticMode": "workspace",
18+
"python.terminal.activateEnvironment": false,
1519
}
1620
}

pyproject.toml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ dev = [
2626
"pytest-cov ~= 4.0.0",
2727
"path-dict ~= 3.0.4",
2828
"ruff>=0.11.6",
29+
"mypy>=1.14.1",
2930
]
3031

3132

@@ -41,25 +42,21 @@ package = true
4142
[tool.ruff]
4243
show-fixes = true
4344
line-length = 120
44-
select = [
45-
"ANN", # annotations
46-
"B", # bugbear
47-
"C", # comprehensions
48-
"E", # style errors
49-
"F", # flakes
50-
"I", # import sorting
51-
"M", # meta
52-
"N", # naming
53-
"U", # upgrade
54-
"W", # style warnings
55-
"YTT", # sys.version
56-
]
45+
select = ["ALL"]
5746
ignore = [
47+
"D", # Docstrings
5848
"E501", # line length
5949
"UP007", # use X | Y for union (not possible in python 3.8)
6050
"UP006", # Use typing.Tuple for python 3.8 support
6151
"W191", # indentation contains tabs
6252
"E741", # ambiguous variable name
53+
"COM812", # Trailing comma missing
54+
"ANN202", # Missing return type annotation for private function
55+
"ANN001", # Missing type annotation for function argument
56+
"S101", # Use of `assert` detected
57+
"ANN201", # Missing return type annotation for public function
58+
"ARG001", # Unused function argument
59+
"T201", # `print` found
6360
]
6461

6562

0 commit comments

Comments
 (0)