Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra authored Dec 28, 2024
2 parents 05b1916 + abed9a8 commit 2c8444f
Show file tree
Hide file tree
Showing 382 changed files with 7,315 additions and 2,780 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
# As of 2024-10-18, ubuntu-latest can refer to different Ubuntu versions,
# which can can cause problems with os module constants.
os: ["ubuntu-24.04", "windows-latest", "macos-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
fail-fast: false

Expand Down Expand Up @@ -119,8 +121,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- uses: astral-sh/setup-uv@v5
- name: Run tests
run: |
cd stub_uploader
Expand All @@ -144,6 +145,6 @@ jobs:
owner: "python",
repo: "typeshed",
title: `Daily tests failed on ${new Date().toDateString()}`,
body: "Runs listed here: https://github.com/python/typeshed/actions/workflows/daily.yml",
body: "Run listed here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
labels: ["help wanted"],
})
2 changes: 1 addition & 1 deletion .github/workflows/stubsabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ jobs:
owner: "python",
repo: "typeshed",
title: `Stubsabot failed on ${new Date().toDateString()}`,
body: "Stubsabot runs are listed here: https://github.com/python/typeshed/actions/workflows/stubsabot.yml",
body: "Stubsabot run is listed here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
})
4 changes: 3 additions & 1 deletion .github/workflows/stubtest_stdlib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
# As of 2024-10-18, ubuntu-latest can refer to different Ubuntu versions,
# which can can cause problems with os module constants.
os: ["ubuntu-24.04", "windows-latest", "macos-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
fail-fast: false

Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ jobs:
with:
# Max supported Python version as of pytype 2024.9.13
python-version: "3.12"
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- uses: astral-sh/setup-uv@v5
- run: uv pip install -r requirements-tests.txt --system
- name: Install external dependencies for 3rd-party stubs
run: |
Expand Down Expand Up @@ -121,8 +120,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- uses: astral-sh/setup-uv@v5
- name: Install typeshed test-suite requirements
# Install these so we can run `get_external_stub_requirements.py`
run: uv pip install -r requirements-tests.txt --system
Expand Down Expand Up @@ -183,8 +181,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- uses: astral-sh/setup-uv@v5
- name: Run tests
run: |
cd stub_uploader
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ select = [
"B", # flake8-bugbear
"FA", # flake8-future-annotations
"I", # isort
"PGH", # pygrep-hooks
"RUF", # Ruff-specific and unused-noqa
"UP", # pyupgrade
"YTT", # flake8-2020
# Flake8 base rules
"E", # pycodestyle Error
"F", # Pyflakes
Expand All @@ -56,16 +58,20 @@ select = [
"PYI014", # Only simple default values allowed for arguments
"PYI015", # Only simple default values allowed for assignments
"PYI016", # Duplicate union member `{}`
"PYI019", # Methods like `{method_name}` should return `Self` instead of a custom `TypeVar`
"PYI020", # Quoted annotations should not be included in stubs
"PYI025", # Use `from collections.abc import Set as AbstractSet` to avoid confusion with the `set` builtin
# "PYI026", Waiting for this mypy bug to be fixed: https://github.com/python/mypy/issues/16581
"PYI030", # Multiple literal members in a union. Use a single literal, e.g. `Literal[{}]`
"PYI032", # Prefer `object` to `Any` for the second parameter to `{method_name}`
"PYI034", # `__new__` methods usually return self at runtime
"PYI036", # Star-args in `{method_name}` should be annotated with `object`
"PYI044", # `from __future__ import annotations` has no effect in stub files, since type checkers automatically treat stubs as having those semantics
"PYI055", # Multiple `type[T]` usages in a union. Combine them into one, e.g., `type[{union_str}]`.
"PYI058", # Use `{return_type}` as the return value for simple `{method}` methods
# "PYI061", # TODO: Enable when out of preview
"PYI062", # Duplicate literal member `{}`
"PYI064", # `Final[Literal[{literal}]]` can be replaced with a bare Final
]
extend-safe-fixes = [
"UP036", # Remove unnecessary `sys.version_info` blocks
Expand Down
1 change: 1 addition & 0 deletions pyrightconfig.stricter.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"stdlib/xml/sax",
"stubs/aiofiles/aiofiles/tempfile/temptypes.pyi",
"stubs/antlr4-python3-runtime",
"stubs/Authlib",
"stubs/aws-xray-sdk",
"stubs/beautifulsoup4",
"stubs/bleach/bleach/sanitizer.pyi",
Expand Down
2 changes: 1 addition & 1 deletion requirements-tests.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Type checkers that we test our stubs against. These should always
# be pinned to a specific version to make failure reproducible.
mypy==1.13.0
mypy==1.14.0
pyright==1.1.389
# pytype can be installed on Windows, but requires building wheels, let's not do that on the CI
pytype==2024.10.11; platform_system != "Windows" and python_version >= "3.10" and python_version < "3.13"
Expand Down
Loading

0 comments on commit 2c8444f

Please sign in to comment.