---
source: crates/ruff_linter/src/rules/flake8_import_conventions/mod.rs
---
ICN001 [*] `altair` should be imported as `alt`
 --> defaults.py:6:12
  |
5 | def unconventional():
6 |     import altair
  |            ^^^^^^
7 |     import matplotlib.pyplot
8 |     import numpy
  |
help: Alias `altair` to `alt`
  |
5 | def unconventional():
  -     import altair
6 +     import altair as alt
7 |     import matplotlib.pyplot
  |
note: This is an unsafe fix and may change runtime behavior

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

ICN001 [*] `numpy` should be imported as `np`
  --> defaults.py:8:12
   |
 6 |     import altair
 7 |     import matplotlib.pyplot
 8 |     import numpy
   |            ^^^^^
 9 |     import pandas
10 |     import seaborn
   |
help: Alias `numpy` to `np`
  |
7 |     import matplotlib.pyplot
  -     import numpy
8 +     import numpy as np
9 |     import pandas
  |
note: This is an unsafe fix and may change runtime behavior

ICN001 [*] `pandas` should be imported as `pd`
  --> defaults.py:9:12
   |
 7 |     import matplotlib.pyplot
 8 |     import numpy
 9 |     import pandas
   |            ^^^^^^
10 |     import seaborn
11 |     import tkinter
   |
help: Alias `pandas` to `pd`
   |
8  |     import numpy
   -     import pandas
9  +     import pandas as pd
10 |     import seaborn
   |
note: This is an unsafe fix and may change runtime behavior

ICN001 [*] `seaborn` should be imported as `sns`
  --> defaults.py:10:12
   |
 8 |     import numpy
 9 |     import pandas
10 |     import seaborn
   |            ^^^^^^^
11 |     import tkinter
12 |     import networkx
   |
help: Alias `seaborn` to `sns`
   |
9  |     import pandas
   -     import seaborn
10 +     import seaborn as sns
11 |     import tkinter
   |
note: This is an unsafe fix and may change runtime behavior

ICN001 [*] `tkinter` should be imported as `tk`
  --> defaults.py:11:12
   |
 9 |     import pandas
10 |     import seaborn
11 |     import tkinter
   |            ^^^^^^^
12 |     import networkx
   |
help: Alias `tkinter` to `tk`
   |
10 |     import seaborn
   -     import tkinter
11 +     import tkinter as tk
12 |     import networkx
   |
note: This is an unsafe fix and may change runtime behavior

ICN001 [*] `networkx` should be imported as `nx`
  --> defaults.py:12:12
   |
10 |     import seaborn
11 |     import tkinter
12 |     import networkx
   |            ^^^^^^^^
   |
help: Alias `networkx` to `nx`
   |
11 |     import tkinter
   -     import networkx
12 +     import networkx as nx
13 |
   |
note: This is an unsafe fix and may change runtime behavior

ICN001 [*] `altair` should be imported as `alt`
  --> defaults.py:16:22
   |
15 | def unconventional_aliases():
16 |     import altair as altr
   |                      ^^^^
17 |     import matplotlib.pyplot as plot
18 |     import numpy as nmp
   |
help: Alias `altair` to `alt`
   |
15 | def unconventional_aliases():
   -     import altair as altr
16 +     import altair as alt
17 |     import matplotlib.pyplot as plot
   |
note: This is an unsafe fix and may change runtime behavior

ICN001 [*] `matplotlib.pyplot` should be imported as `plt`
  --> defaults.py:17:33
   |
15 | def unconventional_aliases():
16 |     import altair as altr
17 |     import matplotlib.pyplot as plot
   |                                 ^^^^
18 |     import numpy as nmp
19 |     import pandas as pdas
   |
help: Alias `matplotlib.pyplot` to `plt`
   |
16 |     import altair as altr
   -     import matplotlib.pyplot as plot
17 +     import matplotlib.pyplot as plt
18 |     import numpy as nmp
   |
note: This is an unsafe fix and may change runtime behavior

ICN001 [*] `numpy` should be imported as `np`
  --> defaults.py:18:21
   |
16 |     import altair as altr
17 |     import matplotlib.pyplot as plot
18 |     import numpy as nmp
   |                     ^^^
19 |     import pandas as pdas
20 |     import seaborn as sbrn
   |
help: Alias `numpy` to `np`
   |
17 |     import matplotlib.pyplot as plot
   -     import numpy as nmp
18 +     import numpy as np
19 |     import pandas as pdas
   |
note: This is an unsafe fix and may change runtime behavior

ICN001 [*] `pandas` should be imported as `pd`
  --> defaults.py:19:22
   |
17 |     import matplotlib.pyplot as plot
18 |     import numpy as nmp
19 |     import pandas as pdas
   |                      ^^^^
20 |     import seaborn as sbrn
21 |     import tkinter as tkr
   |
help: Alias `pandas` to `pd`
   |
18 |     import numpy as nmp
   -     import pandas as pdas
19 +     import pandas as pd
20 |     import seaborn as sbrn
   |
note: This is an unsafe fix and may change runtime behavior

ICN001 [*] `seaborn` should be imported as `sns`
  --> defaults.py:20:23
   |
18 |     import numpy as nmp
19 |     import pandas as pdas
20 |     import seaborn as sbrn
   |                       ^^^^
21 |     import tkinter as tkr
22 |     import networkx as nxy
   |
help: Alias `seaborn` to `sns`
   |
19 |     import pandas as pdas
   -     import seaborn as sbrn
20 +     import seaborn as sns
21 |     import tkinter as tkr
   |
note: This is an unsafe fix and may change runtime behavior

ICN001 [*] `tkinter` should be imported as `tk`
  --> defaults.py:21:23
   |
19 |     import pandas as pdas
20 |     import seaborn as sbrn
21 |     import tkinter as tkr
   |                       ^^^
22 |     import networkx as nxy
   |
help: Alias `tkinter` to `tk`
   |
20 |     import seaborn as sbrn
   -     import tkinter as tkr
21 +     import tkinter as tk
22 |     import networkx as nxy
   |
note: This is an unsafe fix and may change runtime behavior

ICN001 [*] `networkx` should be imported as `nx`
  --> defaults.py:22:24
   |
20 |     import seaborn as sbrn
21 |     import tkinter as tkr
22 |     import networkx as nxy
   |                        ^^^
   |
help: Alias `networkx` to `nx`
   |
21 |     import tkinter as tkr
   -     import networkx as nxy
22 +     import networkx as nx
23 |
   |
note: This is an unsafe fix and may change runtime behavior
