---
source: crates/ruff_linter/src/rules/pylint/mod.rs
---
PLC0414 [*] Import alias does not rename original package
 --> import_aliasing.py:6:8
  |
4 | # 2. consider-using-from-import
5 |
6 | import collections as collections  # [useless-import-alias]
  |        ^^^^^^^^^^^^^^^^^^^^^^^^^^
7 | from collections import OrderedDict as OrderedDict  # [useless-import-alias]
8 | from collections import OrderedDict as o_dict
  |
help: Remove import alias
  |
5 |
  - import collections as collections  # [useless-import-alias]
6 + import collections  # [useless-import-alias]
7 | from collections import OrderedDict as OrderedDict  # [useless-import-alias]
  |
note: This is an unsafe fix and may change runtime behavior

PLC0414 [*] Import alias does not rename original package
 --> import_aliasing.py:7:25
  |
6 | import collections as collections  # [useless-import-alias]
7 | from collections import OrderedDict as OrderedDict  # [useless-import-alias]
  |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
8 | from collections import OrderedDict as o_dict
9 | import os.path as path  # [consider-using-from-import]
  |
help: Remove import alias
  |
6 | import collections as collections  # [useless-import-alias]
  - from collections import OrderedDict as OrderedDict  # [useless-import-alias]
7 + from collections import OrderedDict  # [useless-import-alias]
8 | from collections import OrderedDict as o_dict
  |
note: This is an unsafe fix and may change runtime behavior

PLC0414 [*] Import alias does not rename original package
  --> import_aliasing.py:16:15
   |
14 | import os as OS
15 | from sys import version
16 | from . import bar as bar  # [useless-import-alias]
   |               ^^^^^^^^^^
17 | from . import bar as Bar
18 | from . import bar
   |
help: Remove import alias
   |
15 | from sys import version
   - from . import bar as bar  # [useless-import-alias]
16 + from . import bar  # [useless-import-alias]
17 | from . import bar as Bar
   |
note: This is an unsafe fix and may change runtime behavior

PLC0414 [*] Import alias does not rename original package
  --> import_aliasing.py:19:19
   |
17 | from . import bar as Bar
18 | from . import bar
19 | from ..foo import bar as bar  # [useless-import-alias]
   |                   ^^^^^^^^^^
20 | from ..foo.bar import foobar as foobar  # [useless-import-alias]
21 | from ..foo.bar import foobar as anotherfoobar
   |
help: Remove import alias
   |
18 | from . import bar
   - from ..foo import bar as bar  # [useless-import-alias]
19 + from ..foo import bar  # [useless-import-alias]
20 | from ..foo.bar import foobar as foobar  # [useless-import-alias]
   |
note: This is an unsafe fix and may change runtime behavior

PLC0414 [*] Import alias does not rename original package
  --> import_aliasing.py:20:23
   |
18 | from . import bar
19 | from ..foo import bar as bar  # [useless-import-alias]
20 | from ..foo.bar import foobar as foobar  # [useless-import-alias]
   |                       ^^^^^^^^^^^^^^^^
21 | from ..foo.bar import foobar as anotherfoobar
22 | from . import foo as foo, foo2 as bar2  # [useless-import-alias]
   |
help: Remove import alias
   |
19 | from ..foo import bar as bar  # [useless-import-alias]
   - from ..foo.bar import foobar as foobar  # [useless-import-alias]
20 + from ..foo.bar import foobar  # [useless-import-alias]
21 | from ..foo.bar import foobar as anotherfoobar
   |
note: This is an unsafe fix and may change runtime behavior

PLC0414 [*] Import alias does not rename original package
  --> import_aliasing.py:22:15
   |
20 | from ..foo.bar import foobar as foobar  # [useless-import-alias]
21 | from ..foo.bar import foobar as anotherfoobar
22 | from . import foo as foo, foo2 as bar2  # [useless-import-alias]
   |               ^^^^^^^^^^
23 | from . import foo as bar, foo2 as foo2  # [useless-import-alias]
24 | from . import foo as bar, foo2 as bar2
   |
help: Remove import alias
   |
21 | from ..foo.bar import foobar as anotherfoobar
   - from . import foo as foo, foo2 as bar2  # [useless-import-alias]
22 + from . import foo, foo2 as bar2  # [useless-import-alias]
23 | from . import foo as bar, foo2 as foo2  # [useless-import-alias]
   |
note: This is an unsafe fix and may change runtime behavior

PLC0414 [*] Import alias does not rename original package
  --> import_aliasing.py:23:27
   |
21 | from ..foo.bar import foobar as anotherfoobar
22 | from . import foo as foo, foo2 as bar2  # [useless-import-alias]
23 | from . import foo as bar, foo2 as foo2  # [useless-import-alias]
   |                           ^^^^^^^^^^^^
24 | from . import foo as bar, foo2 as bar2
25 | from foo.bar import foobar as foobar  # [useless-import-alias]
   |
help: Remove import alias
   |
22 | from . import foo as foo, foo2 as bar2  # [useless-import-alias]
   - from . import foo as bar, foo2 as foo2  # [useless-import-alias]
23 + from . import foo as bar, foo2  # [useless-import-alias]
24 | from . import foo as bar, foo2 as bar2
   |
note: This is an unsafe fix and may change runtime behavior

PLC0414 [*] Import alias does not rename original package
  --> import_aliasing.py:25:21
   |
23 | from . import foo as bar, foo2 as foo2  # [useless-import-alias]
24 | from . import foo as bar, foo2 as bar2
25 | from foo.bar import foobar as foobar  # [useless-import-alias]
   |                     ^^^^^^^^^^^^^^^^
26 | from foo.bar import foobar as foo
27 | from .foo.bar import f as foobar
   |
help: Remove import alias
   |
24 | from . import foo as bar, foo2 as bar2
   - from foo.bar import foobar as foobar  # [useless-import-alias]
25 + from foo.bar import foobar  # [useless-import-alias]
26 | from foo.bar import foobar as foo
   |
note: This is an unsafe fix and may change runtime behavior
