Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix null reference for syntax errors due to invalid encodings (Pyflakes) #433

Merged

Conversation

smacke
Copy link
Contributor

@smacke smacke commented Sep 7, 2023

If the syntax error is due to an invalid encoding, text will be None, so we give it an empty string in this case. This fixes #429.

Fixes #429.

@ccordoba12 ccordoba12 added this to the v1.8.0 milestone Sep 7, 2023
@ccordoba12 ccordoba12 added the bug Something isn't working label Sep 7, 2023
@ccordoba12 ccordoba12 changed the title fix null reference for syntax errors due to invalid encodings in pyflakes plugin Fix null reference for syntax errors due to invalid encodings (Pyflakes) Sep 7, 2023
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks @smacke!

@ccordoba12 ccordoba12 merged commit e5c913d into python-lsp:develop Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in Pyflakes plugin: 'NoneType' has no len()
2 participants