You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The resulting code for simple library imports makes code unnecessarily verbose. For example when you import ConfigParser in legacy code or configparser in Python 3.x code, you generally don't want to access the class via six.moves.configparser.ConfigParser. See example below.
The output of modernize tool is not always optimal. This patch makes
usage of `six.moves` less awkward.
Related: PyCQA/modernize#141
Signed-off-by: Pavel Šimerda <[email protected]>
At the end of the day, what I'd really like is for a minimal amount of changed lines in the code, compared to a maximal amount of changed lines. Especially because (someday), the six support will need to be ripped out/augmented for new compatibility -- maybe in the next project major version jump from 3 to 4, aka "twelve" 😄 ?
The resulting code for simple library imports makes code unnecessarily verbose. For example when you import
ConfigParser
in legacy code orconfigparser
in Python 3.x code, you generally don't want to access the class viasix.moves.configparser.ConfigParser
. See example below.Legacy code:
Python 3.x code:
Modernized code:
The text was updated successfully, but these errors were encountered: