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

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

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

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

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

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

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

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