Skip to content

Commit 6227196

Browse files
committed
Merge branch 'master' into overwrite-union-syntax-1
2 parents 57ab706 + 4eb6b50 commit 6227196

Some content is hidden

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

70 files changed

+1156
-325
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,18 @@ jobs:
9595
# tox_extra_args: "-n 4 mypyc/test/test_run.py mypyc/test/test_external.py"
9696
# debug_build: true
9797

98+
- name: Parallel tests with py314-ubuntu, interpreted
99+
python: '3.14'
100+
os: ubuntu-24.04-arm
101+
toxenv: py
102+
tox_extra_args: "-n 4 --mypy-num-workers=4 mypy/test/testcheck.py"
103+
- name: Parallel tests with py314-ubuntu, mypyc-compiled
104+
python: '3.14'
105+
os: ubuntu-24.04-arm
106+
toxenv: py
107+
tox_extra_args: "-n 4 --mypy-num-workers=4 mypy/test/testcheck.py"
108+
test_mypyc: true
109+
98110
- name: Type check our own code (py310-ubuntu)
99111
python: '3.10'
100112
os: ubuntu-latest

docs/source/error_code_list.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,25 @@ Warn about cases where a bytes object may be converted to a string in an unexpec
11511151
print(f"The alphabet starts with {b!r}") # The alphabet starts with b'abc'
11521152
print(f"The alphabet starts with {b.decode('utf-8')}") # The alphabet starts with abc
11531153
1154+
.. _code-str-unpack:
1155+
1156+
Check that ``str`` is not unpacked [str-unpack]
1157+
---------------------------------------------------------
1158+
1159+
It can sometimes be surprising that ``str`` is iterable, especially when unpacking
1160+
in an assignment.
1161+
1162+
Example:
1163+
1164+
.. code-block:: python
1165+
1166+
def print_dict(d: dict[str, str]) -> int:
1167+
# We meant to do d.items(), but instead we're unpacking the str keys of d
1168+
1169+
# Error: Unpacking a string is disallowed
1170+
for k, v in d:
1171+
print(k, v)
1172+
11541173
.. _code-overload-overlap:
11551174

11561175
Check that overloaded functions don't overlap [overload-overlap]

0 commit comments

Comments
 (0)