Environment specific report config overrides? #2173
-
I was messing around with the idea of running pyright over my tests and identified a few specific report configs which I'd likely want to just straight out suppress specific when running it over my tests (mostly to deal with behaviour like unknowns on unittest.mock Mocks) and was wondering if Pyright supported environment (or just path) specific overrides for the "report" configs. For note I couldn't find anything while looking through the documentation but might've missed something or been looking down the wrong tree (kinda focused on executionEnvironments for this) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I'm not sure what you mean by "report config". Can you elaborate? What I tend to do in my test code is to disable specific diagnostic checks that don't apply within that test file. I used # This is needed because the unit test accesses private members.
# pyright: reportPrivateUsage=false Does that meet your needs? |
Beta Was this translation helpful? Give feedback.
I'm not sure what you mean by "report config". Can you elaborate?
What I tend to do in my test code is to disable specific diagnostic checks that don't apply within that test file. I used
# pyright
comments at the top, like this, with comments indicating why they need to be disabled for that test.Does that meet your needs?