Skip to content

Commit 23063c3

Browse files
committed
chore: Fix type checking
1 parent 60a5f94 commit 23063c3

File tree

27 files changed

+128
-31
lines changed

27 files changed

+128
-31
lines changed

.github/workflows/code-style.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ jobs:
113113
114114
- name: Check typing with MyPy
115115
run: |
116-
mypy --install-types --ignore-missing-imports \
117-
--check-untyped-defs --non-interactive \
116+
mypy --install-types \
117+
--check-untyped-defs \
118+
--non-interactive \
118119
packages/*/dsw
119120
120121
# Consistency of version tagging

Makefile

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
.PHONY: clean
2+
clean:
3+
find . -type f -name '*.pyc' -delete
4+
find . -type d -name '__pycache__' -delete
5+
find packages -type d -name 'build' -exec rm -rf {} +
6+
find packages -type d -name 'dist' -exec rm -rf {} +
7+
find packages -type d -name '*.egg-info' -exec rm -rf {} +
8+
9+
.PHONY: install
10+
install:
11+
./scripts/prepare-dev.sh --clean
12+
./scripts/build-info.sh
13+
14+
.PHONY: dev-install
15+
dev-install:
16+
pip install -r requirements.dev.txt
17+
18+
.PHONY: code-style
19+
code-style:
20+
flake8 \
21+
--count
22+
--max-complexity=12
23+
--max-line-length=130
24+
--statistics \
25+
packages
26+
27+
.PHONY: lint
28+
lint:
29+
pylint \
30+
--rcfile=.pylintrc.ini \
31+
--recursive y \
32+
--verbose \
33+
packages/*/dsw
34+
35+
.PHONY: spelling
36+
spelling:
37+
cspell \
38+
--no-progress \
39+
--no-summary \
40+
--config .cspell/cspell.json \
41+
packages/**/*.py \
42+
packages/**/*.md \
43+
packages/**/*.json \
44+
packages/**/*.toml \
45+
packages/**/*.yml \
46+
packages/**/*.yaml
47+
48+
.PHONY: type-check
49+
type-check:
50+
mypy \
51+
--install-types \
52+
--check-untyped-defs \
53+
--non-interactive \
54+
packages/*/dsw

packages/dsw-command-queue/dsw/command_queue/command_queue.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import select
77
import signal
88

9-
import func_timeout
9+
import func_timeout # type: ignore
1010
import psycopg
1111
import psycopg.generators
1212
import tenacity

packages/dsw-command-queue/dsw/command_queue/py.typed

Whitespace-only changes.

packages/dsw-command-queue/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,8 @@ zip-safe = false
4040
[tool.setuptools.packages.find]
4141
include = ['dsw*']
4242

43+
[tool.setuptools.package-data]
44+
'dsw.command_queue' = ['py.typed']
45+
4346
[tool.distutils.bdist_wheel]
4447
universal = true

packages/dsw-config/dsw/config/py.typed

Whitespace-only changes.

packages/dsw-config/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,8 @@ zip-safe = false
3838
[tool.setuptools.packages.find]
3939
include = ['dsw*']
4040

41+
[tool.setuptools.package-data]
42+
'dsw.config' = ['py.typed']
43+
4144
[tool.distutils.bdist_wheel]
4245
universal = true

packages/dsw-data-seeder/dsw/data_seeder/py.typed

Whitespace-only changes.

packages/dsw-data-seeder/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ zip-safe = false
4949
[tool.setuptools.packages.find]
5050
include = ['dsw*']
5151

52+
[tool.setuptools.package-data]
53+
'dsw.data_seeder' = ['py.typed']
54+
5255
[tool.distutils.bdist_wheel]
5356
universal = true
5457

packages/dsw-database/dsw/database/py.typed

Whitespace-only changes.

0 commit comments

Comments
 (0)