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

ℹ Suggested fix
1   |-from __future__ import nested_scopes, generators
2 1 | from __future__ import with_statement, unicode_literals
3 2 | from __future__ import absolute_import, division
4 3 | from __future__ import generator_stop

UP010.py:2:1: UP010 [*] Unnecessary `__future__` imports `unicode_literals`, `with_statement` for target Python version
  |
2 | from __future__ import nested_scopes, generators
3 | from __future__ import with_statement, unicode_literals
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP010
4 | from __future__ import absolute_import, division
5 | from __future__ import generator_stop
  |
  = help: Remove unnecessary `future` import

ℹ Suggested fix
1 1 | from __future__ import nested_scopes, generators
2   |-from __future__ import with_statement, unicode_literals
3 2 | from __future__ import absolute_import, division
4 3 | from __future__ import generator_stop
5 4 | from __future__ import print_function, generator_stop

UP010.py:3:1: UP010 [*] Unnecessary `__future__` imports `absolute_import`, `division` for target Python version
  |
3 | from __future__ import nested_scopes, generators
4 | from __future__ import with_statement, unicode_literals
5 | from __future__ import absolute_import, division
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP010
6 | from __future__ import generator_stop
7 | from __future__ import print_function, generator_stop
  |
  = help: Remove unnecessary `future` import

ℹ Suggested fix
1 1 | from __future__ import nested_scopes, generators
2 2 | from __future__ import with_statement, unicode_literals
3   |-from __future__ import absolute_import, division
4 3 | from __future__ import generator_stop
5 4 | from __future__ import print_function, generator_stop
6 5 | from __future__ import invalid_module, generators

UP010.py:4:1: UP010 [*] Unnecessary `__future__` import `generator_stop` for target Python version
  |
4 | from __future__ import with_statement, unicode_literals
5 | from __future__ import absolute_import, division
6 | from __future__ import generator_stop
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP010
7 | from __future__ import print_function, generator_stop
8 | from __future__ import invalid_module, generators
  |
  = help: Remove unnecessary `future` import

ℹ Suggested fix
1 1 | from __future__ import nested_scopes, generators
2 2 | from __future__ import with_statement, unicode_literals
3 3 | from __future__ import absolute_import, division
4   |-from __future__ import generator_stop
5 4 | from __future__ import print_function, generator_stop
6 5 | from __future__ import invalid_module, generators
7 6 | 

UP010.py:5:1: UP010 [*] Unnecessary `__future__` imports `generator_stop`, `print_function` for target Python version
  |
5 | from __future__ import absolute_import, division
6 | from __future__ import generator_stop
7 | from __future__ import print_function, generator_stop
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP010
8 | from __future__ import invalid_module, generators
  |
  = help: Remove unnecessary `future` import

ℹ Suggested fix
2 2 | from __future__ import with_statement, unicode_literals
3 3 | from __future__ import absolute_import, division
4 4 | from __future__ import generator_stop
5   |-from __future__ import print_function, generator_stop
6 5 | from __future__ import invalid_module, generators
7 6 | 
8 7 | if True:

UP010.py:6:1: UP010 [*] Unnecessary `__future__` import `generators` for target Python version
   |
 6 | from __future__ import generator_stop
 7 | from __future__ import print_function, generator_stop
 8 | from __future__ import invalid_module, generators
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP010
 9 | 
10 | if True:
   |
   = help: Remove unnecessary `future` import

ℹ Suggested fix
3 3 | from __future__ import absolute_import, division
4 4 | from __future__ import generator_stop
5 5 | from __future__ import print_function, generator_stop
6   |-from __future__ import invalid_module, generators
  6 |+from __future__ import invalid_module
7 7 | 
8 8 | if True:
9 9 |     from __future__ import generator_stop

UP010.py:9:5: UP010 [*] Unnecessary `__future__` import `generator_stop` for target Python version
   |
 9 | if True:
10 |     from __future__ import generator_stop
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP010
11 |     from __future__ import generators
   |
   = help: Remove unnecessary `future` import

ℹ Suggested fix
6  6  | from __future__ import invalid_module, generators
7  7  | 
8  8  | if True:
9     |-    from __future__ import generator_stop
10 9  |     from __future__ import generators
11 10 | 
12 11 | if True:

UP010.py:10:5: UP010 [*] Unnecessary `__future__` import `generators` for target Python version
   |
10 | if True:
11 |     from __future__ import generator_stop
12 |     from __future__ import generators
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP010
13 | 
14 | if True:
   |
   = help: Remove unnecessary `future` import

ℹ Suggested fix
7  7  | 
8  8  | if True:
9  9  |     from __future__ import generator_stop
10    |-    from __future__ import generators
   10 |+    pass
11 11 | 
12 12 | if True:
13 13 |     from __future__ import generator_stop

UP010.py:13:5: UP010 [*] Unnecessary `__future__` import `generator_stop` for target Python version
   |
13 | if True:
14 |     from __future__ import generator_stop
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP010
15 |     from __future__ import invalid_module, generators
   |
   = help: Remove unnecessary `future` import

ℹ Suggested fix
10 10 |     from __future__ import generators
11 11 | 
12 12 | if True:
13    |-    from __future__ import generator_stop
14 13 |     from __future__ import invalid_module, generators

UP010.py:14:5: UP010 [*] Unnecessary `__future__` import `generators` for target Python version
   |
14 | if True:
15 |     from __future__ import generator_stop
16 |     from __future__ import invalid_module, generators
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP010
   |
   = help: Remove unnecessary `future` import

ℹ Suggested fix
11 11 | 
12 12 | if True:
13 13 |     from __future__ import generator_stop
14    |-    from __future__ import invalid_module, generators
   14 |+    from __future__ import invalid_module


