---
source: crates/ruff_linter/src/rules/flake8_builtins/mod.rs
---
A001 Variable `print` is shadowing a Python builtin
 --> A001.py:5:1
  |
3 | from directory import new as dir
4 |
5 | print = 1
  | ^^^^^
6 | copyright: 'annotation' = 2
7 | (complex := 3)
  |

A001 Variable `copyright` is shadowing a Python builtin
 --> A001.py:6:1
  |
5 | print = 1
6 | copyright: 'annotation' = 2
  | ^^^^^^^^^
7 | (complex := 3)
8 | float = object = 4
  |

A001 Variable `complex` is shadowing a Python builtin
 --> A001.py:7:2
  |
5 | print = 1
6 | copyright: 'annotation' = 2
7 | (complex := 3)
  |  ^^^^^^^
8 | float = object = 4
9 | min, max = 5, 6
  |

A001 Variable `float` is shadowing a Python builtin
 --> A001.py:8:1
  |
6 | copyright: 'annotation' = 2
7 | (complex := 3)
8 | float = object = 4
  | ^^^^^
9 | min, max = 5, 6
  |

A001 Variable `object` is shadowing a Python builtin
 --> A001.py:8:9
  |
6 | copyright: 'annotation' = 2
7 | (complex := 3)
8 | float = object = 4
  |         ^^^^^^
9 | min, max = 5, 6
  |

A001 Variable `min` is shadowing a Python builtin
  --> A001.py:9:1
   |
 7 | (complex := 3)
 8 | float = object = 4
 9 | min, max = 5, 6
   | ^^^
10 |
11 | id = 4
   |

A001 Variable `max` is shadowing a Python builtin
  --> A001.py:9:6
   |
 7 | (complex := 3)
 8 | float = object = 4
 9 | min, max = 5, 6
   |      ^^^
10 |
11 | id = 4
   |

A001 Variable `bytes` is shadowing a Python builtin
  --> A001.py:13:5
   |
11 | id = 4
12 |
13 | def bytes():
   |     ^^^^^
14 |     pass
   |

A001 Variable `slice` is shadowing a Python builtin
  --> A001.py:16:7
   |
14 |     pass
15 |
16 | class slice:
   |       ^^^^^
17 |     pass
   |

A001 Variable `ValueError` is shadowing a Python builtin
  --> A001.py:21:23
   |
19 | try:
20 |     ...
21 | except ImportError as ValueError:
   |                       ^^^^^^^^^^
22 |     ...
   |

A001 Variable `memoryview` is shadowing a Python builtin
  --> A001.py:24:5
   |
22 |     ...
23 |
24 | for memoryview, *bytearray in []:
   |     ^^^^^^^^^^
25 |     pass
   |

A001 Variable `bytearray` is shadowing a Python builtin
  --> A001.py:24:18
   |
22 |     ...
23 |
24 | for memoryview, *bytearray in []:
   |                  ^^^^^^^^^
25 |     pass
   |

A001 Variable `str` is shadowing a Python builtin
  --> A001.py:27:22
   |
25 |     pass
26 |
27 | with open('file') as str, open('file2') as (all, any):
   |                      ^^^
28 |     pass
   |

A001 Variable `all` is shadowing a Python builtin
  --> A001.py:27:45
   |
25 |     pass
26 |
27 | with open('file') as str, open('file2') as (all, any):
   |                                             ^^^
28 |     pass
   |

A001 Variable `any` is shadowing a Python builtin
  --> A001.py:27:50
   |
25 |     pass
26 |
27 | with open('file') as str, open('file2') as (all, any):
   |                                                  ^^^
28 |     pass
   |

A001 Variable `sum` is shadowing a Python builtin
  --> A001.py:30:8
   |
28 |     pass
29 |
30 | [0 for sum in ()]
   |        ^^^
   |
