Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not allow to yield too long tuples #601

Closed
sobolevn opened this issue Jun 21, 2019 · 3 comments
Closed

Do not allow to yield too long tuples #601

sobolevn opened this issue Jun 21, 2019 · 3 comments
Labels
help wanted Extra attention is needed level:starter Good for newcomers rule request Adding a new rule

Comments

@sobolevn
Copy link
Member

Rule request

Thesis

Expressions like yield foo, bar, baz, fling, flung should not be allowed.

Reasoning

We should use lists of similar type or wrapper objects instead.
Related: https://github.com/troessner/reek/blob/master/docs/Long-Yield-List.md
Original: #422

@sobolevn sobolevn added help wanted Extra attention is needed level:starter Good for newcomers rule request Adding a new rule labels Jun 21, 2019
@fullset
Copy link
Contributor

fullset commented Jun 26, 2019

@sobolevn Can I work on this?

Is it necessary also to add param which will be manage the maximum length of yield-tuple to config?

@sobolevn
Copy link
Member Author

@fullset you are welcome!

Nope, let's make it concrete. I would say that 5 is max. 6 should raise a violation.

@sobolevn
Copy link
Member Author

7+-2 is the important number for this project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed level:starter Good for newcomers rule request Adding a new rule
Projects
None yet
Development

No branches or pull requests

2 participants