ruff
2cde9b8a - [`flake8-pyi`] Implement PYI017 (#5895)

Commit
2 years ago
[`flake8-pyi`] Implement PYI017 (#5895) ## Summary Implements `PYI017` or `Y017` from `flake8-pyi` plug-in. Mirrors [upstream implementation](https://github.com/PyCQA/flake8-pyi/blob/ceab86d16b822d12abae1d8087850d0bc66d2f52/pyi.py#L1039-L1048). It checks for any assignment with more than 1 target or an assignment to anything other than a name, and raises a violation for these in stub files. Couldn't find a clear and concise explanation for why this is to be avoided and what is preferred for attribute cases like: ```python a.b = int ``` So welcome some input there, to learn and to finish up the docs. ## Test Plan Added test cases from upstream plug-in in a fixture (both `.py` and `.pyi`). Added a few more. ## Issue link Refers: https://github.com/astral-sh/ruff/issues/848
Author
Parents
Loading