Comments (4)
I allowed those because they appeared in typeshed when I wrote the check, and I assumed (possibly incorrectly) that pytype did something useful with the raise statements.
Assignments I believe are allowed because some typeshed stubs were setting attributes in __init__
methods. If there are no instances of that left, we can tighten the check.
from flake8-pyi.
It seems typeshed still has a few raises left:
$ rgrep " raise " stdlib/ third_party/ | wc -l
81
from flake8-pyi.
typeshed will pass both Y090 and Y091 when python/typeshed#3355 gets merged. Depending on whether backwards compatibility matters for flake8-pyi they could get merged back into Y010 or be enabled by default.
from flake8-pyi.
I think we should make it a separate check because my understanding is that there are a few users outside of typeshed and they might be unhappy to get this new check.
from flake8-pyi.
Related Issues (20)
- Should we flag "unused" PEP-695 TypeVars? HOT 3
- Flag forbidden imports on the line they occur (after dropping support for Python 3.9)
- Detect redundant unions with buffer/bytes types? HOT 3
- Rule: Prefer `Iterator` over simple `Generator` for `__iter__` return type
- Standardizing Union of `Literal` and `None` HOT 7
- Detect nested `Literal` HOT 3
- Ensure `Generic` is always the last base class
- Detect redundant `Generic` in a class's bases? HOT 1
- Arguments to protocol methods should never be positional-or-keyword HOT 1
- Y053 should allow long strings as argument to `@deprecated`
- Disallow old-style positional only args (starting with double underscore) HOT 3
- Y019 sensitive to PEP 570 syntax
- Support flake8==7.0.0 HOT 3
- Warn for IO types like io.BytesIO HOT 4
- [Stylistic] Enforce a space after `# pyright:`, `# mypy:` and `# noqa:` comments HOT 5
- Final literals HOT 3
- text
- Warn about redundant `Incomplete` annotations HOT 1
- Y090 false positive for PEP-646
- Implement typeshed's if/else `sys.version_info` order of new vs old block
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flake8-pyi.