Skip to content

Is global-variable-not-assigned (PLW0602) auto fixable? #14031

Answered by MichaReiser
harupy asked this question in Q&A
Discussion options

You must be logged in to vote

No, it's not. The reason is that there's no obvious fix. The fix is either:

  • To remove the globals
  • To assign to it

but Ruff doesn't know which one it is. The documentation mentions when a fix is available. E.g. iteration-over-set states that it always has a fix.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@harupy
Comment options

Answer selected by harupy
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