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

"import" at the beginning of module name in multiline import breaks code representation [python] #38

Open
webknjaz opened this issue Mar 28, 2018 · 1 comment

Comments

@webknjaz
Copy link

import_plugins turns into import_plugins_plugins●ort_plugins.
It might be multiline-only bug, but I haven't checked.

Example: https://github.com/ansible/ansible/blob/b9b8081/test/runner/lib/cloud/__init__.py#L19

source:

from lib.util import (
    ApplicationError,
    display,
    is_shippable,
    import_plugins,
    load_plugins,
    ABC,
)

result:

from lib●.util import (
    ApplicationError,
    display,
    is_shippable,
    import_plugins_pluginsort_plugins,
    load_plugins,
    ABC,
)
@webknjaz webknjaz changed the title "import" at the beginning of module name breaks code representation "import" at the beginning of module name in multiline breaks code representation Mar 28, 2018
@webknjaz webknjaz changed the title "import" at the beginning of module name in multiline breaks code representation "import" at the beginning of module name in multiline import breaks code representation Mar 28, 2018
@webknjaz webknjaz changed the title "import" at the beginning of module name in multiline import breaks code representation "import" at the beginning of module name in multiline import breaks code representation [python] Oct 5, 2018
@filips123
Copy link
Contributor

There is another similar problem. If there is a comment in the same line as import and it contains module name, it will be highlighted and linked in a comment instead on import.

Source:

import math # For the mathematical functions
import time # For the time functions

Result:

result

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

2 participants