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

New rule prohibiting modification of sys.path #15806

Open
vraintanakarei opened this issue Jan 29, 2025 · 0 comments
Open

New rule prohibiting modification of sys.path #15806

vraintanakarei opened this issue Jan 29, 2025 · 0 comments

Comments

@vraintanakarei
Copy link

Description

I think modification of sys.path is a bad practice because it breaks type checking, code completion, code highlighting, etc.
Therefore, I would like to ban it in my team, but I could not find a rule to check it.

If such a rule does not already exist, please consider adding a rule prohibiting changes to sys.path.
For my purpose, these codes should be prohibited with a few exceptions.

  • sys.path.append(...)
  • sys.path.extend(...)
  • sys.path = ...
  • etc.

Thank you very much.

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

No branches or pull requests

1 participant