---
source: crates/ruff_linter/src/rules/flake8_tidy_imports/mod.rs
---
TID253 `torch` is banned at the module level
 --> TID253.py:2:8
  |
1 | ## Banned modules ##
2 | import torch
  |        ^^^^^
3 |
4 | from torch import *
  |

TID253 `torch` is banned at the module level
 --> TID253.py:4:1
  |
2 | import torch
3 |
4 | from torch import *
  | ^^^^^^^^^^^^^^^^^^^
5 |
6 | from tensorflow import a, b, c
  |

TID253 `tensorflow` is banned at the module level
 --> TID253.py:6:1
  |
4 | from torch import *
5 |
6 | from tensorflow import a, b, c
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 |
8 | import torch as torch_wearing_a_trenchcoat
  |

TID253 `torch` is banned at the module level
  --> TID253.py:8:8
   |
 6 | from tensorflow import a, b, c
 7 |
 8 | import torch as torch_wearing_a_trenchcoat
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 9 |
10 | # this should count as module level
   |

TID253 `tensorflow` is banned at the module level
  --> TID253.py:11:15
   |
10 | # this should count as module level
11 | x = 1; import tensorflow
   |               ^^^^^^^^^^
12 |
13 | # banning a module also bans any submodules
   |

TID253 `torch` is banned at the module level
  --> TID253.py:14:8
   |
13 | # banning a module also bans any submodules
14 | import torch.foo.bar
   |        ^^^^^^^^^^^^^
15 |
16 | from tensorflow.foo import bar
   |

TID253 `tensorflow` is banned at the module level
  --> TID253.py:16:1
   |
14 | import torch.foo.bar
15 |
16 | from tensorflow.foo import bar
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 |
18 | from torch.foo.bar import *
   |

TID253 `torch` is banned at the module level
  --> TID253.py:18:1
   |
16 | from tensorflow.foo import bar
17 |
18 | from torch.foo.bar import *
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 |
20 | # unlike TID251, inline imports are *not* banned
   |
