Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
dbf819b
Replace validate_stubs scripts with stubtest
Avasam May 23, 2025
986fbe8
Bump minimum CI Python version to 3.10 because of scipy-stubs
Avasam May 23, 2025
ba3ac03
Merge branch 'main' of https://github.com/microsoft/python-type-stubs…
Avasam May 23, 2025
41a66b4
Post-merge and cross-versions checks fix
Avasam May 23, 2025
179d50a
Merge branch 'main' of https://github.com/microsoft/python-type-stubs…
Avasam May 23, 2025
c88641f
Fix typos
Avasam May 23, 2025
c075039
Merge branch 'main' of https://github.com/microsoft/python-type-stubs…
Avasam May 23, 2025
da7a262
Fixed Python 3.13 cross-platform stubtest issues
Avasam May 24, 2025
0b480e8
Fix all differences between Python 3.10 and 3.13 (on Windows)
Avasam May 24, 2025
662db14
Missed an entry
Avasam May 24, 2025
e529bb0
Fix pyright re-export issues
Avasam May 24, 2025
585b85a
Merge branch 'main' of https://github.com/microsoft/python-type-stubs…
Avasam May 24, 2025
1edd30a
Merge branch 'main' of https://github.com/microsoft/python-type-stubs…
Avasam May 28, 2025
72f5e8e
Merge branch 'main' of https://github.com/microsoft/python-type-stubs…
Avasam May 29, 2025
5d980b3
Remove solved allowlist entries post merge
Avasam May 29, 2025
920b14f
joblib already installed as dep
Avasam May 29, 2025
ac1c1da
Run ruff format
Avasam May 29, 2025
7c2c30e
Forgot an unused import
Avasam May 29, 2025
7a5a540
Discard changes to stubs/sklearn/feature_extraction/_dict_vectorizer.pyi
Avasam May 29, 2025
0d2d6b1
Discard changes to stubs/sklearn/ensemble/_hist_gradient_boosting/pre…
Avasam May 29, 2025
9537ef8
Discard changes to stubs/sklearn/ensemble/_hist_gradient_boosting/bin…
Avasam May 29, 2025
6f295f8
Fix macOS run
Avasam May 30, 2025
d2743a5
Merge branch 'Replace-validate_stubs-scripts-with-stubtest' of https:…
Avasam May 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
# Oldest non-EOL and newest released
python-version: ["3.9", "3.13"]
fail-fast: false

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Setup Python
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: "3.11"
python-version: ${{ matrix.python-version }}

- name: Cache pip
uses: actions/cache@v4
Expand All @@ -35,6 +40,9 @@ jobs:
- name: Run mypy tests
run: python -m mypy .

- name: Run stubtest
run: python tests/run_stubtests.py

hygiene:
runs-on: ubuntu-latest
timeout-minutes: 10
Expand All @@ -45,4 +53,5 @@ jobs:

- name: Run Ruff Linter
uses: astral-sh/ruff-action@v3
- run: ruff format --check
- name: Run Ruff Formatter
run: ruff format --check
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,9 @@ MigrationBackup/
# Python virtual environment
.venv

# Lock files (like uv.lock)
*.lock

# Build files from utils
.eggs
*.egg-info
Expand Down
26 changes: 21 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,29 @@ hygiene = ["ruff ==0.11.*"]
tests = [
# Tools used for testing
"docopt-ng",
"mypy ==1.13.*",
"mypy ==1.15.*",
"pyright",

# Typed libraries and stubs
"matplotlib >=3.8",
"numpy >=2",
"pandas-stubs",
"pytest",
"scipy-stubs",
"typing_extensions",

# Untyped libraries, used to prevent "reportMissingImports" and get inferred typing
# Untyped libraries. Used to prevent "reportMissingImports" and get inferred typing
"joblib",
"networkx",
"PyOpenGL",
"scikit-learn",
"sympy",
"traitlets",
"transformers",

# The libraries we're stubbing. Needed for stubtest
"networkx",
"scikit-image",
"scikit-learn",
"sympy",
"vispy",
]
dev = [{ include-group = "hygiene" }, { include-group = "tests" }]

Expand Down Expand Up @@ -57,6 +62,7 @@ target-version = "py39"
extend-select = [
"FA", # flake8-future-annotations
"I", # isort
"ICN", # flake8-import-conventions
"PYI", # flake8-pyi
"UP", # pyupgrade
"W", # pycodestyle Warning
Expand Down Expand Up @@ -100,12 +106,22 @@ ignore = [
# We keep docstrings in sklearn
"stubs/sklearn/**" = ["PYI021"]

[tool.ruff.lint.flake8-import-conventions.aliases]
# Prevent aliasing these, as it causes false-negatives for certain rules
typing_extensions = "typing_extensions"
typing = "typing"

[tool.ruff.lint.isort]
combine-as-imports = true
extra-standard-library = [
# Group these with stdlib
"typing_extensions",
"_typeshed",
# Extra modules not recognized by Ruff
# Added in Python 3.9
"zoneinfo",
# Added in Python 3.14
"compression",
]

[tool.pyright]
Expand Down
Loading
Loading