Skip to content

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
Discussion options

You must be logged in to vote

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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by OnesoftQwQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants