Skip to content

Commit 51dfd10

Browse files
committed
Implement Python checks and fix some violations
1 parent 377e9de commit 51dfd10

47 files changed

Lines changed: 2533 additions & 3 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/check-python.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: check-python
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "tools/**.py"
7+
- "pyrightconfig.json"
8+
- ".github/workflows/check-python.yml"
9+
push:
10+
paths:
11+
- "tools/**.py"
12+
- "pyrightconfig.json"
13+
- ".github/workflows/check-python.yml"
14+
15+
jobs:
16+
pyright:
17+
name: Pyright type check
18+
runs-on: ubuntu-24.04
19+
20+
steps:
21+
- name: checkout
22+
uses: actions/checkout@v6
23+
24+
- name: setup Node
25+
uses: actions/setup-node@v6
26+
with:
27+
node-version: "20"
28+
29+
- name: install pyright
30+
run: npm install -g pyright
31+
32+
- name: run pyright
33+
run: pyright

.github/workflows/check.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333
- name: check-source.sh
3434
run: ../tools/check-source.sh
3535

36+
- name: check-source.py
37+
run: python3 ../tools/check-source.py
38+
3639
- name: update brew
3740
if: matrix.cfg.os == 'macos-15'
3841
run: brew update

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ tools/sections
2222
*.synctex.gz
2323
*.synctex*
2424
.check.stamp
25+
__pycache__

pyrightconfig.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"include": [
3+
"tools/*.py"
4+
],
5+
"typeCheckingMode": "strict",
6+
"reportMissingTypeStubs": false,
7+
"reportUnknownMemberType": false,
8+
"reportUnknownArgumentType": false,
9+
"reportUnknownVariableType": false,
10+
"reportUnknownParameterType": false,
11+
"reportUnusedImport": true,
12+
"reportUnusedVariable": true,
13+
"pythonVersion": "3.11"
14+
}

source/algorithms.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
%!TEX root = std.tex
2+
%NOCHECKBEGIN(lib-ranges-*)
23
\rSec0[algorithms]{Algorithms library}
34

45
\rSec1[algorithms.general]{General}

source/assets/example_01.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
%NOCHECKBEGIN
12
\documentclass[9pt]{standalone}
23

34
\usepackage{fontspec}

source/assets/example_02.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
%NOCHECKBEGIN
12
\documentclass[9pt]{standalone}
23

34
\usepackage{fontspec}

source/assets/example_03.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
%NOCHECKBEGIN
12
\documentclass[9pt]{standalone}
23

34
\usepackage{fontspec}

source/assets/example_04.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
%NOCHECKBEGIN
12
\documentclass[9pt]{standalone}
23

34
\usepackage{fontspec}

source/assets/example_05.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
%NOCHECKBEGIN
12
\documentclass[9pt]{standalone}
23

34
\usepackage{fontspec}

0 commit comments

Comments
 (0)