Repository navigation
v1.1.0: rule CS008: context managers
New rule CS008: nested "with" statements of the same type should be comma-separated
❌ Anti-pattern
with method1(arg) as variable1:
with method2(arg) as variable2:
with method3(arg) as variable3:
do_something(...)
✅ Best practice
with (
method1(arg) as variable1,
method2(arg) as variable2,
method3(arg) as variable3,
):
do_something(...)
https://github.com/mytestopia/flake8-qa-style/blob/main/rules/CS008.md