-
Notifications
You must be signed in to change notification settings - Fork 559
41 lines (36 loc) · 1.09 KB
/
python-quality.yml
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
name: Python quality
on:
push:
branches:
- main
paths-ignore:
- "js/**"
- "api-inference-community/**"
pull_request:
types: [assigned, opened, synchronize, reopened]
paths-ignore:
- "js/**"
- "api-inference-community/**"
jobs:
check_code_quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install --upgrade pip
pip install .[dev]
- run: black --check tests src contrib
- run: ruff tests src contrib
- run: python utils/check_contrib_list.py
- run: python utils/check_static_imports.py
- run: python utils/generate_async_inference_client.py
# Run type checking at least on huggingface_hub root file to check all modules
# that can be lazy-loaded actually exist.
- run: mypy src/huggingface_hub/__init__.py --follow-imports=silent --show-traceback
# Run mypy on full package
- run: mypy src