Pylance will not parse the code correctly when the try statement has more than 730 lines of code #6789
Answered
by
erictraut
OnesoftQwQ
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
erictraut
Dec 19, 2024
Replies: 1 comment
-
You have exceeded the cycolmatic complexity limit for a single function. Pyright (the static type checker that pylance is built upon) has internal limits to prevent performance issues when analyzing especially complex code flow graphs. Once this limit is exceeded, static analysis is skipped for that function. You can avoid this by simplifying your code — by using loops or subroutines, for example. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
OnesoftQwQ
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have exceeded the cycolmatic complexity limit for a single function. Pyright (the static type checker that pylance is built upon) has internal limits to prevent performance issues when analyzing especially complex code flow graphs. Once this limit is exceeded, static analysis is skipped for that function.
You can avoid this by simplifying your code — by using loops or subroutines, for example.