-
Notifications
You must be signed in to change notification settings - Fork 291
48 lines (42 loc) · 1.61 KB
/
Copy pathlint.yml
File metadata and controls
48 lines (42 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Lint (mypy)
# Runs mypy against the curated list of modules below. The list intentionally
# starts narrow: every file here passes today, so a regression that
# reintroduces a "missing proto attribute" mistake (e.g. ``response.method``
# vs ``.type``, ``response.route_params`` vs ``.ws_params``) fails the build.
#
# Expand the list as more modules are cleaned up. ``follow_imports = silent``
# in pyproject.toml means mypy still reads types from upstream imports but
# only reports errors on the files passed in here, so the scope grows
# incrementally without each addition fighting the current baseline.
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install package + dev tools
run: |
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install "mypy>=1.10" types-PyYAML jinja2 pyyaml
- name: Run mypy
run: |
python -m mypy --follow-imports=silent \
TikTokLive/proto/__init__.py \
TikTokLive/proto/proto_utils.py \
TikTokLive/events/custom_events.py \
TikTokLive/client/__init__.py \
TikTokLive/client/ws/ws_utils.py \
TikTokLive/client/web/web_client.py \
TikTokLive/client/web/web_settings.py \
TikTokLive/client/web/web_utils.py \
scripts/proto/gen_aliases.py \
scripts/proto/gen_events.py