Skip to content

Conversation

@Avasam
Copy link
Collaborator

@AvasamAvasam commented Jan 11, 2023

Brought back and reworded a 5yo comment explaining why NonCallableMock is subclassed with Any.

Feel free to wordsmith.

Ref: #9491

@github-actions
Copy link
Contributor

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

cwltool (https://github.com/common-workflow-language/cwltool) - tests/test_cuda.py:3: note: ... from here:

@srittau
Copy link
Collaborator

The problem here are not so much the false positives, but that mocks are explicitly designed to stand in for other types, something that can't be expressed with our static type system.

@AlexWaygood
Copy link
Member

I'd also rather avoid introducing unused type: ignores -- I'd rather introduce type: ignores for the false-positives all together as part of #9491.

@Avasam
Copy link
CollaboratorAuthor

Closing in favor of #9491

@AvasamAvasam closed this Jan 11, 2023
@AvasamAvasam deleted the mock-subclassing-any branch February 29, 2024 00:44
Sign up for freeto 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.

3 participants

@Avasam@srittau@AlexWaygood