Comments (6)
What is the exact incompatibility?
from flake8-pyi.
yarl/__init__.pyi:9:1: E302 expected 2 blank lines, found 1
yarl/__init__.pyi:32:5: E301 expected 1 blank line, found 0
yarl/__init__.pyi:35:5: E301 expected 1 blank line, found 0
Looks like black
removes blank lines: https://github.com/aio-libs/yarl/blob/master/yarl/__init__.pyi
from flake8-pyi.
I know what issue you're facing and unfortunately it's a #wontfix.
Black follows the intended .pyi style described in PEP 484 and subsequently elaborated in typeshed docs. Flake8's E301 and E302 (and quite a few others) are incompatible with this style.
Flake8-pyi introduces new behavior to Flake8 but due to how Flake8 is built, Flake8-pyi cannot disable or change behavior of other warning codes :(
from flake8-pyi.
Should I suppress E301 and E302 in setup.cfg
?
from flake8-pyi.
If you're using Black and have CI or pre-commit to help you if you forget, then there's little point leaving E and W warnings on.
from flake8-pyi.
Got you. Thanks!
from flake8-pyi.
Related Issues (20)
- 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
- `Y016` doesn't account for single member unions HOT 3
- `Y062` doesn't account for nested literals HOT 2
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.