Skip to content

Commit 6c45c3f

Browse files
committed
Merge remote-tracking branch 'upstream/master' into bugfix/st-property-on-class-checkmember
2 parents 9c739b3 + f49a1cb commit 6c45c3f

File tree

98 files changed

+4072
-1858
lines changed

Some content is hidden

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

98 files changed

+4072
-1858
lines changed

.github/workflows/mypy_primer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
persist-credentials: false
4040
- uses: actions/setup-python@v5
4141
with:
42-
python-version: "3.12"
42+
python-version: "3.13"
4343
- name: Install dependencies
4444
run: |
4545
python -m pip install -U pip

.github/workflows/test.yml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,57 +33,49 @@ jobs:
3333
# the oldest and newest supported Python versions
3434
- name: Test suite with py39-ubuntu, mypyc-compiled
3535
python: '3.9'
36-
arch: x64
37-
os: ubuntu-latest
36+
os: ubuntu-24.04-arm
3837
toxenv: py
3938
tox_extra_args: "-n 4"
4039
test_mypyc: true
4140
- name: Test suite with py39-windows-64
4241
python: '3.9'
43-
arch: x64
4442
os: windows-latest
4543
toxenv: py39
4644
tox_extra_args: "-n 4"
4745
- name: Test suite with py310-ubuntu
4846
python: '3.10'
49-
arch: x64
50-
os: ubuntu-latest
47+
os: ubuntu-24.04-arm
5148
toxenv: py
5249
tox_extra_args: "-n 4"
5350
- name: Test suite with py311-ubuntu, mypyc-compiled
5451
python: '3.11'
55-
arch: x64
56-
os: ubuntu-latest
52+
os: ubuntu-24.04-arm
5753
toxenv: py
5854
tox_extra_args: "-n 4"
5955
test_mypyc: true
6056
- name: Test suite with py312-ubuntu, mypyc-compiled
6157
python: '3.12'
62-
arch: x64
63-
os: ubuntu-latest
58+
os: ubuntu-24.04-arm
6459
toxenv: py
6560
tox_extra_args: "-n 4"
6661
test_mypyc: true
6762
- name: Test suite with py313-ubuntu, mypyc-compiled
6863
python: '3.13'
69-
arch: x64
70-
os: ubuntu-latest
64+
os: ubuntu-24.04-arm
7165
toxenv: py
7266
tox_extra_args: "-n 4"
7367
test_mypyc: true
7468

7569
# - name: Test suite with py314-dev-ubuntu
7670
# python: '3.14-dev'
77-
# arch: x64
78-
# os: ubuntu-latest
71+
# os: ubuntu-24.04-arm
7972
# toxenv: py
8073
# tox_extra_args: "-n 4"
8174
# allow_failure: true
8275
# test_mypyc: true
8376

8477
- name: mypyc runtime tests with py39-macos
8578
python: '3.9.21'
86-
arch: x64
8779
# TODO: macos-13 is the last one to support Python 3.9, change it to macos-latest when updating the Python version
8880
os: macos-13
8981
toxenv: py
@@ -93,20 +85,17 @@ jobs:
9385
# - https://github.com/python/mypy/pull/17822
9486
# - name: mypyc runtime tests with py38-debug-build-ubuntu
9587
# python: '3.9.21'
96-
# arch: x64
9788
# os: ubuntu-latest
9889
# toxenv: py
9990
# tox_extra_args: "-n 4 mypyc/test/test_run.py mypyc/test/test_external.py"
10091
# debug_build: true
10192

10293
- name: Type check our own code (py39-ubuntu)
10394
python: '3.9'
104-
arch: x64
10595
os: ubuntu-latest
10696
toxenv: type
10797
- name: Type check our own code (py39-windows-64)
10898
python: '3.9'
109-
arch: x64
11099
os: windows-latest
111100
toxenv: type
112101

@@ -115,7 +104,6 @@ jobs:
115104
# to ensure the tox env works as expected
116105
- name: Formatting and code style with Black + ruff
117106
python: '3.10'
118-
arch: x64
119107
os: ubuntu-latest
120108
toxenv: lint
121109

@@ -169,7 +157,6 @@ jobs:
169157
if: ${{ !(matrix.debug_build || endsWith(matrix.python, '-dev')) }}
170158
with:
171159
python-version: ${{ matrix.python }}
172-
architecture: ${{ matrix.arch }}
173160

174161
- name: Install tox
175162
run: |

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222
- id: check-github-actions
2323
- id: check-readthedocs
2424
- repo: https://github.com/rhysd/actionlint
25-
rev: v1.7.6
25+
rev: v1.7.7
2626
hooks:
2727
- id: actionlint
2828
args: [

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ graft test-data
4242
graft mypy/test
4343
include conftest.py
4444
include runtests.py
45-
include pytest.ini
4645
include tox.ini
4746

4847
include LICENSE mypyc/README.md CHANGELOG.md

docs/source/command_line.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -692,9 +692,8 @@ of the above sections.
692692
.. option:: --extra-checks
693693

694694
This flag enables additional checks that are technically correct but may be
695-
impractical in real code. In particular, it prohibits partial overlap in
696-
``TypedDict`` updates, and makes arguments prepended via ``Concatenate``
697-
positional-only. For example:
695+
impractical. In particular, it prohibits partial overlap in ``TypedDict`` updates,
696+
and makes arguments prepended via ``Concatenate`` positional-only. For example:
698697

699698
.. code-block:: python
700699
@@ -717,6 +716,13 @@ of the above sections.
717716
bad: Bad = {"a": 0, "b": "no"}
718717
test(bad, bar)
719718
719+
In future more checks may be added to this flag if:
720+
721+
* The corresponding use cases are rare, thus not justifying a dedicated
722+
strictness flag.
723+
724+
* The new check cannot be supported as an opt-in error code.
725+
720726
.. option:: --strict
721727

722728
This flag mode enables all optional error checking flags. You can see the

docs/source/config_file.rst

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ section of the command line docs.
748748
:type: boolean
749749
:default: False
750750

751-
This flag enables additional checks that are technically correct but may be impractical in real code.
751+
This flag enables additional checks that are technically correct but may be impractical.
752752
See :option:`mypy --extra-checks` for more info.
753753

754754
.. confval:: implicit_reexport
@@ -771,13 +771,6 @@ section of the command line docs.
771771
from foo import bar
772772
__all__ = ['bar']
773773
774-
.. confval:: strict_concatenate
775-
776-
:type: boolean
777-
:default: False
778-
779-
Make arguments prepended via ``Concatenate`` be truly positional-only.
780-
781774
.. confval:: strict_equality
782775

783776
:type: boolean

docs/source/existing_code.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,8 @@ The following config is equivalent to ``--strict`` (as of mypy 1.0):
199199
warn_redundant_casts = True
200200
warn_unused_ignores = True
201201
202-
# Getting these passing should be easy
202+
# Getting this passing should be easy
203203
strict_equality = True
204-
strict_concatenate = True
205204
206205
# Strongly recommend enabling this one as soon as you can
207206
check_untyped_defs = True
@@ -223,6 +222,10 @@ The following config is equivalent to ``--strict`` (as of mypy 1.0):
223222
# This one can be tricky to get passing if you use a lot of untyped libraries
224223
warn_return_any = True
225224
225+
# This one is a catch-all flag for the rest of strict checks that are technically
226+
# correct but may not be practical
227+
extra_checks = True
228+
226229
Note that you can also start with ``--strict`` and subtract, for instance:
227230

228231
.. code-block:: text

0 commit comments

Comments
 (0)