Comments (3)
I agree, this will be way more clear. Do you want to send a PR?
from flake8-broken-line.
Oh, thanks for this question!
I use several other languages and they all have some kind of chaining (or piping).
Like, js
has:
some
.first()
.second()
.finalize()
And elixir
has:
some
|> first()
|> second()
|> finalize()
But, python is not suited for this kind of chaining. Instead I use this indentation:
some.first(
param1, param2,
).second(
keyword=value,
).finalize()
It allows me not to use \
to break lines. On the other hand when I have calls without any params: I ask myself if design is good enough. Because it looks and feels unpythonic.
I hope this illustrates my idea well enough! 👍
from flake8-broken-line.
Thanks, this makes sense. I think the wording is just odd. Maybe instead of "do not reimplement chaining" it should just be "do not use for method chaining" and provide the alternative formatting you've given here.
from flake8-broken-line.
Related Issues (20)
- Broken line in triple quotes HOT 4
- Support python3.8
- Dependabot can't resolve your Python dependency files
- Dependabot can't resolve your Python dependency files
- Dependabot can't resolve your Python dependency files
- Fix the CI and update deps HOT 4
- '''\ Is detected as line break in triple quoted strings HOT 7
- Typo: "Found backslash that is used for line breaking" HOT 2
- How to chain methods without arguments? HOT 1
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- Add python3.9 support
- PEP8 backslash exception for `with` statements is not honored HOT 1
- Support for flake8 4.x HOT 2
- [N400] How to short imports? HOT 3
- Please release new version HOT 8
- Compat with flake8 >= 6 HOT 8
- Backslashes in rf strings not honored as in r strings.
- Backslash at end of comment incorrectly detected
- False-positive for backslashes in multiline strings
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-broken-line.