Skip to content

Use int | Any for types.FrameType.f_lineno #6935

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 17, 2022
Merged

Conversation

AlexWaygood
Copy link
Member

Refs discussion in #6769

@github-actions
Copy link
Contributor

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

pytest (https://github.com/pytest-dev/pytest)
- src/_pytest/_code/code.py:140: error: Unsupported operand types for - ("None" and "int")  [operator]
- src/_pytest/_code/code.py:140: note: Left operand is of type "Optional[int]"
- testing/deprecated_test.py:125: error: Unsupported operand types for > ("int" and "None")  [operator]
- testing/deprecated_test.py:125: note: Left operand is of type "Optional[int]"
- testing/deprecated_test.py:125: error: Unsupported operand types for < ("int" and "None")  [operator]
- testing/deprecated_test.py:125: note: Right operand is of type "Optional[int]"

rich (https://github.com/willmcgugan/rich)
- rich/console.py:1818: error: Incompatible return value type (got "Tuple[str, Optional[int], Dict[str, Any]]", expected "Tuple[str, int, Dict[str, Any]]")

Copy link
Collaborator

@Akuli Akuli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the mypy_primer output :)

@Akuli Akuli merged commit 1eadf1a into python:master Jan 17, 2022
@AlexWaygood AlexWaygood deleted the patch-1 branch January 17, 2022 09:33
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.

2 participants