Skip to content

Commit e81063a

Browse files
Merge pull request #69 from stumpylog/master
Initial support for typing
2 parents ec9d12a + 5229d6b commit e81063a

File tree

5 files changed

+150
-107
lines changed

5 files changed

+150
-107
lines changed

.github/workflows/clh_tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
pip3 install --upgrade hatch
2525
- name: Run linting
2626
run: |
27-
hatch run lint:style
27+
hatch run lint:all
2828
2929
test:
3030
name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }}

pyproject.toml

+27
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,14 @@ dependencies = [
9292
"black>=23.9.1",
9393
"mypy>=1.6.0",
9494
"ruff>=0.1.0",
95+
"portalocker",
9596
]
9697

9798
[tool.hatch.envs.lint.scripts]
99+
typing = [
100+
"mypy --version",
101+
"mypy --install-types --non-interactive {args:src/concurrent_log_handler}"
102+
]
98103
style = [
99104
"ruff {args:.}",
100105
"black --check --diff {args:.}",
@@ -104,6 +109,10 @@ fmt = [
104109
"ruff {args:.}",
105110
"style",
106111
]
112+
all = [
113+
"style",
114+
"typing",
115+
]
107116

108117
[tool.ruff]
109118
output-format = "grouped"
@@ -186,3 +195,21 @@ testpaths =["tests"]
186195
omit = [
187196
"tests/stresstest.py"
188197
]
198+
199+
[tool.mypy]
200+
python_version = "3.8"
201+
platform = "linux"
202+
disallow_any_unimported = true
203+
disallow_any_explicit = true
204+
disallow_untyped_defs = true
205+
disallow_untyped_calls = true
206+
disallow_incomplete_defs = true
207+
check_untyped_defs = true
208+
strict_optional = true
209+
210+
warn_redundant_casts = true
211+
warn_unused_ignores = true
212+
warn_no_return = true
213+
warn_return_any = true
214+
warn_unreachable = true
215+
warn_unused_configs = true

0 commit comments

Comments
 (0)