---
source: crates/ruff_linter/src/rules/pylint/mod.rs
---
import_aliasing.py:6:8: PLC0414 [*] Import alias does not rename original package
  |
4 | # 2. consider-using-from-import
5 |
6 | import collections as collections  # [useless-import-alias]
  |        ^^^^^^^^^^^^^^^^^^^^^^^^^^ PLC0414
7 | from collections import OrderedDict as OrderedDict  # [useless-import-alias]
8 | from collections import OrderedDict as o_dict
  |
  = help: Remove import alias

ℹ Unsafe fix
3 3 | # 1. useless-import-alias
4 4 | # 2. consider-using-from-import
5 5 | 
6   |-import collections as collections  # [useless-import-alias]
  6 |+import collections  # [useless-import-alias]
7 7 | from collections import OrderedDict as OrderedDict  # [useless-import-alias]
8 8 | from collections import OrderedDict as o_dict
9 9 | import os.path as path  # [consider-using-from-import]

import_aliasing.py:7:25: PLC0414 [*] Import alias does not rename original package
  |
6 | import collections as collections  # [useless-import-alias]
7 | from collections import OrderedDict as OrderedDict  # [useless-import-alias]
  |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^ PLC0414
8 | from collections import OrderedDict as o_dict
9 | import os.path as path  # [consider-using-from-import]
  |
  = help: Remove import alias

ℹ Unsafe fix
4 4 | # 2. consider-using-from-import
5 5 | 
6 6 | import collections as collections  # [useless-import-alias]
7   |-from collections import OrderedDict as OrderedDict  # [useless-import-alias]
  7 |+from collections import OrderedDict  # [useless-import-alias]
8 8 | from collections import OrderedDict as o_dict
9 9 | import os.path as path  # [consider-using-from-import]
10 10 | import os.path as p

import_aliasing.py:16:15: PLC0414 [*] Import alias does not rename original package
   |
14 | import os as OS
15 | from sys import version
16 | from . import bar as bar  # [useless-import-alias]
   |               ^^^^^^^^^^ PLC0414
17 | from . import bar as Bar
18 | from . import bar
   |
   = help: Remove import alias

ℹ Unsafe fix
13 13 | import os
14 14 | import os as OS
15 15 | from sys import version
16    |-from . import bar as bar  # [useless-import-alias]
   16 |+from . import bar  # [useless-import-alias]
17 17 | from . import bar as Bar
18 18 | from . import bar
19 19 | from ..foo import bar as bar  # [useless-import-alias]

import_aliasing.py:19:19: PLC0414 [*] Import alias does not rename original package
   |
17 | from . import bar as Bar
18 | from . import bar
19 | from ..foo import bar as bar  # [useless-import-alias]
   |                   ^^^^^^^^^^ PLC0414
20 | from ..foo.bar import foobar as foobar  # [useless-import-alias]
21 | from ..foo.bar import foobar as anotherfoobar
   |
   = help: Remove import alias

ℹ Unsafe fix
16 16 | from . import bar as bar  # [useless-import-alias]
17 17 | from . import bar as Bar
18 18 | from . import bar
19    |-from ..foo import bar as bar  # [useless-import-alias]
   19 |+from ..foo import bar  # [useless-import-alias]
20 20 | from ..foo.bar import foobar as foobar  # [useless-import-alias]
21 21 | from ..foo.bar import foobar as anotherfoobar
22 22 | from . import foo as foo, foo2 as bar2  # [useless-import-alias]

import_aliasing.py:20:23: PLC0414 [*] Import alias does not rename original package
   |
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]
   |                       ^^^^^^^^^^^^^^^^ PLC0414
21 | from ..foo.bar import foobar as anotherfoobar
22 | from . import foo as foo, foo2 as bar2  # [useless-import-alias]
   |
   = help: Remove import alias

ℹ Unsafe fix
17 17 | from . import bar as Bar
18 18 | from . import bar
19 19 | from ..foo import bar as bar  # [useless-import-alias]
20    |-from ..foo.bar import foobar as foobar  # [useless-import-alias]
   20 |+from ..foo.bar import foobar  # [useless-import-alias]
21 21 | from ..foo.bar import foobar as anotherfoobar
22 22 | from . import foo as foo, foo2 as bar2  # [useless-import-alias]
23 23 | from . import foo as bar, foo2 as foo2  # [useless-import-alias]

import_aliasing.py:22:15: PLC0414 [*] Import alias does not rename original package
   |
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]
   |               ^^^^^^^^^^ PLC0414
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

ℹ Unsafe fix
19 19 | from ..foo import bar as bar  # [useless-import-alias]
20 20 | from ..foo.bar import foobar as foobar  # [useless-import-alias]
21 21 | from ..foo.bar import foobar as anotherfoobar
22    |-from . import foo as foo, foo2 as bar2  # [useless-import-alias]
   22 |+from . import foo, foo2 as bar2  # [useless-import-alias]
23 23 | from . import foo as bar, foo2 as foo2  # [useless-import-alias]
24 24 | from . import foo as bar, foo2 as bar2
25 25 | from foo.bar import foobar as foobar  # [useless-import-alias]

import_aliasing.py:23:27: PLC0414 [*] Import alias does not rename original package
   |
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]
   |                           ^^^^^^^^^^^^ PLC0414
24 | from . import foo as bar, foo2 as bar2
25 | from foo.bar import foobar as foobar  # [useless-import-alias]
   |
   = help: Remove import alias

ℹ Unsafe fix
20 20 | from ..foo.bar import foobar as foobar  # [useless-import-alias]
21 21 | from ..foo.bar import foobar as anotherfoobar
22 22 | from . import foo as foo, foo2 as bar2  # [useless-import-alias]
23    |-from . import foo as bar, foo2 as foo2  # [useless-import-alias]
   23 |+from . import foo as bar, foo2  # [useless-import-alias]
24 24 | from . import foo as bar, foo2 as bar2
25 25 | from foo.bar import foobar as foobar  # [useless-import-alias]
26 26 | from foo.bar import foobar as foo

import_aliasing.py:25:21: PLC0414 [*] Import alias does not rename original package
   |
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]
   |                     ^^^^^^^^^^^^^^^^ PLC0414
26 | from foo.bar import foobar as foo
27 | from .foo.bar import f as foobar
   |
   = help: Remove import alias

ℹ Unsafe fix
22 22 | from . import foo as foo, foo2 as bar2  # [useless-import-alias]
23 23 | from . import foo as bar, foo2 as foo2  # [useless-import-alias]
24 24 | from . import foo as bar, foo2 as bar2
25    |-from foo.bar import foobar as foobar  # [useless-import-alias]
   25 |+from foo.bar import foobar  # [useless-import-alias]
26 26 | from foo.bar import foobar as foo
27 27 | from .foo.bar import f as foobar
28 28 | from ............a import b  # [relative-beyond-top-level]
