Improve inference of parameter types in function decorated with pytest.mark.parametrize
#6024
Sachaa-Thanasius
started this conversation in
Enhancement
Replies: 1 comment
-
let's see how much upvote we get. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Pylance can currently infer the types of parameters in a function decorated with
pytest.mark.parametrize
, but only if the first argument ofparametrize
is a single string instead of a list or a tuple. I think it would be worth extending the analysis of the first argument to lists and tuples as well, as I think they're pretty common patterns for defining the list of parameters as well.Pylance info:
Version:
v2024.6.100 (pre-release)
Settings:
(can include more if need be, I just checked the pytest-related ones)
Screenshot displaying lack of inference:
Reproduction code:
Reproduction folder structure:
Beta Was this translation helpful? Give feedback.
All reactions