---
source: crates/ruff_linter/src/rules/pyupgrade/mod.rs
---
UP010 [*] Unnecessary `__future__` imports `generators`, `nested_scopes` for target Python version
 --> UP010_1.py:1:1
  |
1 | from __future__ import nested_scopes, generators
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 | from __future__ import with_statement, unicode_literals
  |
help: Remove unnecessary `__future__` import
  |
  - from __future__ import nested_scopes, generators
1 | from __future__ import with_statement, unicode_literals
  |

UP010 [*] Unnecessary `__future__` import `unicode_literals` for target Python version
 --> UP010_1.py:2:1
  |
1 | from __future__ import nested_scopes, generators
2 | from __future__ import with_statement, unicode_literals
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 |
4 | from __future__ import absolute_import, division
  |
help: Remove unnecessary `__future__` import
  |
1 | from __future__ import nested_scopes, generators
  - from __future__ import with_statement, unicode_literals
2 + from __future__ import with_statement
3 |
  |

UP010 [*] Unnecessary `__future__` import `absolute_import` for target Python version
 --> UP010_1.py:4:1
  |
2 | from __future__ import with_statement, unicode_literals
3 |
4 | from __future__ import absolute_import, division
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5 | from __future__ import generator_stop
6 | from __future__ import print_function, nested_scopes, generator_stop
  |
help: Remove unnecessary `__future__` import
  |
3 |
  - from __future__ import absolute_import, division
4 + from __future__ import division
5 | from __future__ import generator_stop
  |

UP010 [*] Unnecessary `__future__` import `generator_stop` for target Python version
 --> UP010_1.py:5:1
  |
4 | from __future__ import absolute_import, division
5 | from __future__ import generator_stop
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 | from __future__ import print_function, nested_scopes, generator_stop
  |
help: Remove unnecessary `__future__` import
  |
4 | from __future__ import absolute_import, division
  - from __future__ import generator_stop
5 | from __future__ import print_function, nested_scopes, generator_stop
  |

UP010 [*] Unnecessary `__future__` import `nested_scopes` for target Python version
 --> UP010_1.py:6:1
  |
4 | from __future__ import absolute_import, division
5 | from __future__ import generator_stop
6 | from __future__ import print_function, nested_scopes, generator_stop
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 |
8 | print(with_statement)
  |
help: Remove unnecessary `__future__` import
  |
5 | from __future__ import generator_stop
  - from __future__ import print_function, nested_scopes, generator_stop
6 + from __future__ import print_function, generator_stop
7 |
  |
