-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
fixesRelated to suggested fixes for violationsRelated to suggested fixes for violations
Description
Can an autofix be created for the preview rule PLW1514 ? Even if it's "unsafe". Updating hundreds of instances manually is quite tedious.
In Python 3.10+ this would autofix to encoding="locale", in Python <=3.9 this would autofix to encoding=locale.getpreferredencoding(False) (see: https://peps.python.org/pep-0597/). Search & replacing those if I want a specific encoding is easier. An option to specify prefered encoding can also be set (which could even be re-used by a new rule that ensures consistent encoding is used with desired value, like "utf-8")
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
fixesRelated to suggested fixes for violationsRelated to suggested fixes for violations