Skip to content

Conversation

@hauntsaninja
Copy link
Collaborator

@hauntsaninja hauntsaninja commented Nov 29, 2025

Resolves #13823. Supersedes #15511. See also #6406

To avail of this, try --disable-error-code str-unpack

@github-actions

This comment has been minimized.

@hauntsaninja hauntsaninja marked this pull request as ready for review November 29, 2025 01:19
@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

spark (https://github.com/apache/spark)
+ python/pyspark/core/context.py:330: error: Unpacking a string is disallowed  [str-unpack]
+ python/pyspark/core/context.py:330: note: Error code "str-unpack" not covered by "type: ignore" comment

aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/web_log.py:197: error: Unused "type: ignore" comment  [unused-ignore]
+ aiohttp/web_log.py:197:30: error: Unpacking a string is disallowed  [str-unpack]
+ aiohttp/web_log.py:197:30: note: Error code "str-unpack" not covered by "type: ignore" comment
+ aiohttp/web_log.py:197:30: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-str-unpack for more info
+ aiohttp/web_log.py:198: error: Unused "type: ignore[has-type]" comment  [unused-ignore]
+ aiohttp/web_log.py:199: error: Unused "type: ignore[has-type]" comment  [unused-ignore]
+ aiohttp/web_log.py:200: error: Unused "type: ignore[has-type]" comment  [unused-ignore]

operator (https://github.com/canonical/operator)
- ops/framework.py:153: error: Unpacking a string is disallowed  [misc]
+ ops/framework.py:153: error: Unpacking a string is disallowed  [str-unpack]

@hauntsaninja hauntsaninja merged commit c2a9642 into python:master Dec 2, 2025
21 checks passed
@hauntsaninja hauntsaninja deleted the strunpack2 branch December 2, 2025 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow string unpacking again.

1 participant