Skip to content

Fix typing of params ids callable form #7496

Merged
bluetech merged 2 commits intopytest-dev:masterfrom
bluetech:typing-idfn
Jul 15, 2020
Merged

Fix typing of params ids callable form #7496
bluetech merged 2 commits intopytest-dev:masterfrom
bluetech:typing-idfn

Conversation

@bluetech
Copy link
Copy Markdown
Member

Fixes #7494.

There is also a commit which adds a testing/typing_check.py file whose purpose is only to not have any mypy errors.

bluetech added 2 commits July 14, 2020 14:37
We probably something a bit more elaborate in the future but for now
it's something to verify fixes and catch regressions.
The previous typing had an object passed to the user, which they can't
do anything with without asserting, which is inconvenient. Change it to
Any instead.

Note that what comes *back* to pytest (the return value) should be an
`object`, because we want to handle arbitrary objects without assuming
anything about them.
@@ -0,0 +1,24 @@
"""File for checking typing issues.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good idea! 👍

@bluetech bluetech merged commit 41c40ef into pytest-dev:master Jul 15, 2020
@bluetech bluetech deleted the typing-idfn branch July 23, 2020 10:58
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.

6.0.0rc1 pytest.fixture mypy error: Value of type "object" is not indexable

2 participants