-
Why is the following code giving me "type is unknown" messages from _pytest.fixtures import SubRequest
@fixture(scope="module")
def someFixture1(request: SubRequest):
rssUrl: str
daysToRetrieve: int
rssUrl, daysToRetrieve = request.param # Getting an error here, `Type of "rssUrl" is unknown` and `Type of "daysToRetrieve" is unknown`
... But code like this is OK, @fixture(scope="module")
def someFixture2(request: SubRequest):
rssUrl: str = request.param
... |
Beta Was this translation helpful? Give feedback.
Answered by
erictraut
Feb 4, 2021
Replies: 2 comments
-
Are you using strict mode? You should not receive "type is unknown" unless I receive "type is unknown" errors in both of the examples you provided. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Looks like there's a missing annotation in the pytest code. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
paxcodes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like there's a missing annotation in the pytest code.