File tree Expand file tree Collapse file tree 2 files changed +64
-3
lines changed
Expand file tree Collapse file tree 2 files changed +64
-3
lines changed Original file line number Diff line number Diff line change 1+ on :
2+ push :
3+ paths :
4+ - " ignis/**"
5+ - " .github/workflows/static.yaml"
6+ pull_request :
7+ paths :
8+ - " ignis/**"
9+ - " .github/workflows/static.yaml"
10+
11+ name : Static Analysis
12+ jobs :
13+ mypy-check :
14+ name : Mypy
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v4
18+ - name : Set up Python
19+ uses : actions/setup-python@v5
20+ with :
21+ python-version : " 3.12"
22+
23+ - name : Install system dependencies
24+ run : |
25+ sudo apt update
26+ sudo apt install libcairo2-dev git
27+
28+ - name : Clone Ignis repository
29+ run : |
30+ git clone https://github.com/linkfrg/ignis.git src
31+
32+ - name : Install Python dependencies
33+ run : |
34+ python -m pip install --upgrade pip
35+ cd src
36+ pip install --no-deps --config-settings=setup-args="-Dbuild_gvc=false" --config-settings=setup-args="-Ddependency_check=false" .
37+ pip install -r dev.txt
38+ grep -vE "PyGObject|setuptools" requirements.txt | pip install -r /dev/stdin
39+ cd ..
40+
41+ - name : Run mypy analysis
42+ run : |
43+ MYPYPATH=ignis mypy --explicit-package-bases ignis
44+
45+ ruff-check :
46+ name : Ruff
47+ runs-on : ubuntu-latest
48+ steps :
49+ - uses : actions/checkout@v4
50+ - name : Set up Python
51+ uses : actions/setup-python@v5
52+ with :
53+ python-version : " 3.12"
54+ - name : Install Python dependencies
55+ run : |
56+ python -m pip install --upgrade pip
57+ pip install ruff
58+
59+ - name : Check code
60+ run : ruff check
61+
62+ - name : Check format
63+ run : ruff format --check
Original file line number Diff line number Diff line change 11[tool .mypy ]
22python_version = " 3.10"
3- files = [" ignis" , " /sda3/ignis/ignis" ] # replace /sda3/ignis/ignis with the actual path to Ignis sources
43exclude = [" venv" ]
54disable_error_code = [
65 " no-redef" , # allow variable redefinition (needed for GObject.Property decorator)
76 " method-assign" , # also needed for GObject.Property
87 " import-untyped"
98]
10- explicit_package_bases = true
11- mypy_path = [" stubs" , " ignis" ]
9+ mypy_path = [" stubs" ]
1210check_untyped_defs = true
1311
1412[[tool .mypy .overrides ]]
You can’t perform that action at this time.
0 commit comments