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

Update a module name to allow import without type errors #2317

Conversation

munahaf
Copy link
Contributor

@munahaf munahaf commented Sep 1, 2023

In file: __init__.py, the list named __all__ contains undefined names which can result in errors when this module is imported. The module name should be of string type. I created a string for the module name. For more information regarding all, please read about importing fields from a package.

Here is a video that demonstrates the type error that happens during import when the module name is not represented as a string. Here when foo is exported, it is not done as a string. So, when this is imported and used, we get an error.

Sponsorship and Support:

This work is done by the security researchers from OpenRefactory and is supported by the Open Source Security Foundation (OpenSSF): Project Alpha-Omega. Alpha-Omega is a project partnering with open source software project maintainers to systematically find new, as-yet-undiscovered vulnerabilities in open source code - and get them fixed – to improve global software supply chain security.

The bug is found by running the Intelligent Code Repair (iCR) tool by OpenRefactory and then manually triaging the results.

@rchl rchl merged commit 663afdc into sublimelsp:main Sep 3, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants