---
source: crates/ruff_linter/src/rules/flake8_import_conventions/mod.rs
snapshot_kind: text
---
defaults.py:6:12: ICN001 [*] `altair` should be imported as `alt`
  |
5 | def unconventional():
6 |     import altair
  |            ^^^^^^ ICN001
7 |     import matplotlib.pyplot
8 |     import numpy
  |
  = help: Alias `altair` to `alt`

ℹ Unsafe fix
3 3 | 
4 4 | 
5 5 | def unconventional():
6   |-    import altair
  6 |+    import altair as alt
7 7 |     import matplotlib.pyplot
8 8 |     import numpy
9 9 |     import pandas

defaults.py:7:12: ICN001 `matplotlib.pyplot` should be imported as `plt`
  |
5 | def unconventional():
6 |     import altair
7 |     import matplotlib.pyplot
  |            ^^^^^^^^^^^^^^^^^ ICN001
8 |     import numpy
9 |     import pandas
  |
  = help: Alias `matplotlib.pyplot` to `plt`

defaults.py:8:12: ICN001 [*] `numpy` should be imported as `np`
   |
 6 |     import altair
 7 |     import matplotlib.pyplot
 8 |     import numpy
   |            ^^^^^ ICN001
 9 |     import pandas
10 |     import seaborn
   |
   = help: Alias `numpy` to `np`

ℹ Unsafe fix
5 5 | def unconventional():
6 6 |     import altair
7 7 |     import matplotlib.pyplot
8   |-    import numpy
  8 |+    import numpy as np
9 9 |     import pandas
10 10 |     import seaborn
11 11 |     import tkinter

defaults.py:9:12: ICN001 [*] `pandas` should be imported as `pd`
   |
 7 |     import matplotlib.pyplot
 8 |     import numpy
 9 |     import pandas
   |            ^^^^^^ ICN001
10 |     import seaborn
11 |     import tkinter
   |
   = help: Alias `pandas` to `pd`

ℹ Unsafe fix
6  6  |     import altair
7  7  |     import matplotlib.pyplot
8  8  |     import numpy
9     |-    import pandas
   9  |+    import pandas as pd
10 10 |     import seaborn
11 11 |     import tkinter
12 12 |     import networkx

defaults.py:10:12: ICN001 [*] `seaborn` should be imported as `sns`
   |
 8 |     import numpy
 9 |     import pandas
10 |     import seaborn
   |            ^^^^^^^ ICN001
11 |     import tkinter
12 |     import networkx
   |
   = help: Alias `seaborn` to `sns`

ℹ Unsafe fix
7  7  |     import matplotlib.pyplot
8  8  |     import numpy
9  9  |     import pandas
10    |-    import seaborn
   10 |+    import seaborn as sns
11 11 |     import tkinter
12 12 |     import networkx
13 13 | 

defaults.py:11:12: ICN001 [*] `tkinter` should be imported as `tk`
   |
 9 |     import pandas
10 |     import seaborn
11 |     import tkinter
   |            ^^^^^^^ ICN001
12 |     import networkx
   |
   = help: Alias `tkinter` to `tk`

ℹ Unsafe fix
8  8  |     import numpy
9  9  |     import pandas
10 10 |     import seaborn
11    |-    import tkinter
   11 |+    import tkinter as tk
12 12 |     import networkx
13 13 | 
14 14 | 

defaults.py:12:12: ICN001 [*] `networkx` should be imported as `nx`
   |
10 |     import seaborn
11 |     import tkinter
12 |     import networkx
   |            ^^^^^^^^ ICN001
   |
   = help: Alias `networkx` to `nx`

ℹ Unsafe fix
9  9  |     import pandas
10 10 |     import seaborn
11 11 |     import tkinter
12    |-    import networkx
   12 |+    import networkx as nx
13 13 | 
14 14 | 
15 15 | def unconventional_aliases():

defaults.py:16:22: ICN001 [*] `altair` should be imported as `alt`
   |
15 | def unconventional_aliases():
16 |     import altair as altr
   |                      ^^^^ ICN001
17 |     import matplotlib.pyplot as plot
18 |     import numpy as nmp
   |
   = help: Alias `altair` to `alt`

ℹ Unsafe fix
13 13 | 
14 14 | 
15 15 | def unconventional_aliases():
16    |-    import altair as altr
   16 |+    import altair as alt
17 17 |     import matplotlib.pyplot as plot
18 18 |     import numpy as nmp
19 19 |     import pandas as pdas

defaults.py:17:33: ICN001 [*] `matplotlib.pyplot` should be imported as `plt`
   |
15 | def unconventional_aliases():
16 |     import altair as altr
17 |     import matplotlib.pyplot as plot
   |                                 ^^^^ ICN001
18 |     import numpy as nmp
19 |     import pandas as pdas
   |
   = help: Alias `matplotlib.pyplot` to `plt`

ℹ Unsafe fix
14 14 | 
15 15 | def unconventional_aliases():
16 16 |     import altair as altr
17    |-    import matplotlib.pyplot as plot
   17 |+    import matplotlib.pyplot as plt
18 18 |     import numpy as nmp
19 19 |     import pandas as pdas
20 20 |     import seaborn as sbrn

defaults.py:18:21: ICN001 [*] `numpy` should be imported as `np`
   |
16 |     import altair as altr
17 |     import matplotlib.pyplot as plot
18 |     import numpy as nmp
   |                     ^^^ ICN001
19 |     import pandas as pdas
20 |     import seaborn as sbrn
   |
   = help: Alias `numpy` to `np`

ℹ Unsafe fix
15 15 | def unconventional_aliases():
16 16 |     import altair as altr
17 17 |     import matplotlib.pyplot as plot
18    |-    import numpy as nmp
   18 |+    import numpy as np
19 19 |     import pandas as pdas
20 20 |     import seaborn as sbrn
21 21 |     import tkinter as tkr

defaults.py:19:22: ICN001 [*] `pandas` should be imported as `pd`
   |
17 |     import matplotlib.pyplot as plot
18 |     import numpy as nmp
19 |     import pandas as pdas
   |                      ^^^^ ICN001
20 |     import seaborn as sbrn
21 |     import tkinter as tkr
   |
   = help: Alias `pandas` to `pd`

ℹ Unsafe fix
16 16 |     import altair as altr
17 17 |     import matplotlib.pyplot as plot
18 18 |     import numpy as nmp
19    |-    import pandas as pdas
   19 |+    import pandas as pd
20 20 |     import seaborn as sbrn
21 21 |     import tkinter as tkr
22 22 |     import networkx as nxy

defaults.py:20:23: ICN001 [*] `seaborn` should be imported as `sns`
   |
18 |     import numpy as nmp
19 |     import pandas as pdas
20 |     import seaborn as sbrn
   |                       ^^^^ ICN001
21 |     import tkinter as tkr
22 |     import networkx as nxy
   |
   = help: Alias `seaborn` to `sns`

ℹ Unsafe fix
17 17 |     import matplotlib.pyplot as plot
18 18 |     import numpy as nmp
19 19 |     import pandas as pdas
20    |-    import seaborn as sbrn
   20 |+    import seaborn as sns
21 21 |     import tkinter as tkr
22 22 |     import networkx as nxy
23 23 | 

defaults.py:21:23: ICN001 [*] `tkinter` should be imported as `tk`
   |
19 |     import pandas as pdas
20 |     import seaborn as sbrn
21 |     import tkinter as tkr
   |                       ^^^ ICN001
22 |     import networkx as nxy
   |
   = help: Alias `tkinter` to `tk`

ℹ Unsafe fix
18 18 |     import numpy as nmp
19 19 |     import pandas as pdas
20 20 |     import seaborn as sbrn
21    |-    import tkinter as tkr
   21 |+    import tkinter as tk
22 22 |     import networkx as nxy
23 23 | 
24 24 | 

defaults.py:22:24: ICN001 [*] `networkx` should be imported as `nx`
   |
20 |     import seaborn as sbrn
21 |     import tkinter as tkr
22 |     import networkx as nxy
   |                        ^^^ ICN001
   |
   = help: Alias `networkx` to `nx`

ℹ Unsafe fix
19 19 |     import pandas as pdas
20 20 |     import seaborn as sbrn
21 21 |     import tkinter as tkr
22    |-    import networkx as nxy
   22 |+    import networkx as nx
23 23 | 
24 24 | 
25 25 | def conventional_aliases():
