---
source: crates/ruff_linter/src/rules/pyflakes/mod.rs
---
F401 [*] `functools` imported but unused
 --> F401_0.py:2:8
  |
1 | from __future__ import all_feature_names
2 | import functools, os
  |        ^^^^^^^^^
3 | from datetime import datetime
4 | from collections import (
  |
help: Remove unused import: `functools`
  |
1 | from __future__ import all_feature_names
  - import functools, os
2 + import os
3 | from datetime import datetime
  |

F401 [*] `collections.OrderedDict` imported but unused
 --> F401_0.py:6:5
  |
4 | from collections import (
5 |     Counter,
6 |     OrderedDict,
  |     ^^^^^^^^^^^
7 |     namedtuple,
8 | )
  |
help: Remove unused import: `collections.OrderedDict`
  |
5 |     Counter,
  -     OrderedDict,
6 |     namedtuple,
  |

F401 [*] `logging.handlers` imported but unused
  --> F401_0.py:12:8
   |
10 | import multiprocessing.process
11 | import logging.config
12 | import logging.handlers
   |        ^^^^^^^^^^^^^^^^
13 | from typing import (
14 |     TYPE_CHECKING,
   |
help: Remove unused import: `logging.handlers`
   |
11 | import logging.config
   - import logging.handlers
12 | from typing import (
   |

F401 [*] `shelve` imported but unused
  --> F401_0.py:32:12
   |
31 | if TYPE_CHECKING:
32 |     import shelve
   |            ^^^^^^
33 |     import importlib
   |
help: Remove unused import: `shelve`
   |
31 | if TYPE_CHECKING:
   -     import shelve
32 |     import importlib
   |

F401 [*] `importlib` imported but unused
  --> F401_0.py:33:12
   |
31 | if TYPE_CHECKING:
32 |     import shelve
33 |     import importlib
   |            ^^^^^^^^^
34 |
35 | if TYPE_CHECKING:
   |
help: Remove unused import: `importlib`
   |
32 |     import shelve
   -     import importlib
33 |
   |

F401 [*] `pathlib` imported but unused
  --> F401_0.py:37:12
   |
35 | if TYPE_CHECKING:
36 |     """Hello, world!"""
37 |     import pathlib
   |            ^^^^^^^
38 |
39 |     z = 1
   |
help: Remove unused import: `pathlib`
   |
36 |     """Hello, world!"""
   -     import pathlib
37 |
   |

F401 [*] `pickle` imported but unused
  --> F401_0.py:52:16
   |
51 |     def b(self) -> None:
52 |         import pickle
   |                ^^^^^^
   |
help: Remove unused import: `pickle`
   |
51 |     def b(self) -> None:
   -         import pickle
52 +         pass
53 |
   |

F401 [*] `x` imported but unused
  --> F401_0.py:93:16
   |
91 | match *0, 1, *2:
92 |     case 0,:
93 |         import x
   |                ^
94 |         import y
   |
help: Remove unused import: `x`
   |
92 |     case 0,:
   -         import x
93 |         import y
   |

F401 [*] `y` imported but unused
  --> F401_0.py:94:16
   |
92 |     case 0,:
93 |         import x
94 |         import y
   |                ^
   |
help: Remove unused import: `y`
   |
93 |         import x
   -         import y
94 |
   |

F401 [*] `foo.bar.baz` imported but unused
   --> F401_0.py:99:8
    |
 97 | # Test: access a sub-importation via an alias.
 98 | import foo.bar as bop
 99 | import foo.bar.baz
    |        ^^^^^^^^^^^
100 |
101 | print(bop.baz.read_csv("test.csv"))
    |
help: Remove unused import: `foo.bar.baz`
   |
98 | import foo.bar as bop
   - import foo.bar.baz
99 |
   |

F401 [*] `a1` imported but unused
   --> F401_0.py:105:12
    |
103 | # Test: isolated deletions.
104 | if TYPE_CHECKING:
105 |     import a1
    |            ^^
106 |
107 |     import a2
    |
help: Remove unused import: `a1`
    |
104 | if TYPE_CHECKING:
    -     import a1
105 |
    |

F401 [*] `a2` imported but unused
   --> F401_0.py:107:12
    |
105 |     import a1
106 |
107 |     import a2
    |            ^^
    |
help: Remove unused import: `a2`
    |
106 |
    -     import a2
107 |
    |

F401 [*] `b1` imported but unused
   --> F401_0.py:112:16
    |
110 | match *0, 1, *2:
111 |     case 0,:
112 |         import b1
    |                ^^
113 |
114 |         import b2
    |
help: Remove unused import: `b1`
    |
111 |     case 0,:
    -         import b1
112 |
    |

F401 [*] `b2` imported but unused
   --> F401_0.py:114:16
    |
112 |         import b1
113 |
114 |         import b2
    |                ^^
    |
help: Remove unused import: `b2`
    |
113 |
    -         import b2
114 |
    |

F401 [*] `datameta_client_lib.model_helpers.noqa` imported but unused
   --> F401_0.py:122:1
    |
121 | from datameta_client_lib.model_helpers import (
122 | noqa )
    | ^^^^
    |
help: Remove unused import: `datameta_client_lib.model_helpers.noqa`
    |
120 |
    - from datameta_client_lib.model_helpers import (
    - noqa )
    |
