ruff/crates/ruff_python_semantic/src
Charlie Marsh 4997c681f1
[pycodestyle] Allow os.environ modifications between imports (E402) (#10066)
## Summary

Allows, e.g.:

```python
import os

os.environ["WORLD_SIZE"] = "1"
os.putenv("CUDA_VISIBLE_DEVICES", "4")

import torch
```

For now, this is only allowed in preview.

Closes https://github.com/astral-sh/ruff/issues/10059
2024-02-20 13:24:27 -05:00
..
analyze [pycodestyle] Allow os.environ modifications between imports (E402) (#10066) 2024-02-20 13:24:27 -05:00
binding.rs Add a binding kind for comprehension targets (#9967) 2024-02-12 20:09:39 -05:00
branches.rs Add branch detection to the semantic model (#6694) 2023-08-19 21:28:17 +00:00
context.rs Remove separate ReferenceContext enum (#4631) 2023-05-24 15:12:38 +00:00
definition.rs Misc. small tweaks from perusing modules (#9383) 2024-01-03 12:30:25 -05:00
globals.rs Move Ranged into ruff_text_size (#6919) 2023-08-27 14:12:51 -04:00
lib.rs Use a single node hierarchy to track statements and expressions (#6709) 2023-08-21 21:32:57 -04:00
model.rs Make semantic model aware of docstring (#9960) 2024-02-13 04:26:08 +00:00
nodes.rs Move {AnyNodeRef, AstNode} to ruff_python_ast crate root (#8030) 2023-10-18 00:01:18 +00:00
reference.rs Allow flake8-type-checking rules to automatically quote runtime-evaluated references (#6001) 2023-12-13 03:12:38 +00:00
scope.rs [flake8-simplify] Implement enumerate-for-loop (SIM113) (#7777) 2024-01-14 11:00:59 -05:00
star_import.rs Move StarImport to its own module (#5186) 2023-06-20 13:12:46 -04:00