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

[docs] say that both i-control-code and i-dont-control-code are both True by default #3059

Open
webknjaz opened this issue Oct 1, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@webknjaz
Copy link
Contributor

webknjaz commented Oct 1, 2024

What's wrong

$sbj is confusing. Which is it?

How it should be

https://wemake-python-styleguide.rtfd.io/en/latest/pages/usage/configuration.html should not claim two opposite things being true.

Flake8 version and plugins

N/A

pip information

N/A

OS information

N/A

@webknjaz webknjaz added the bug Something isn't working label Oct 1, 2024
@sobolevn
Copy link
Member

sobolevn commented Oct 1, 2024

Thanks!

@nifadyev, are you interested in working on this?

@sobolevn
Copy link
Member

sobolevn commented Oct 1, 2024

By default we assume that people control their code :)

@webknjaz
Copy link
Contributor Author

webknjaz commented Oct 1, 2024

But the explanation refers to the calling code, not the one being linted, eh?

@sobolevn
Copy link
Member

sobolevn commented Oct 1, 2024

Right, this also needs to be clarified. Thanks!

@sobolevn
Copy link
Member

sobolevn commented Oct 1, 2024

The idea is that you use --i-control-code=False when you write a library for others. That's why you can add some extra features that are not recommended in a regular setup, when there's just a single user: you.

@webknjaz
Copy link
Contributor Author

webknjaz commented Oct 2, 2024

Honestly, in the spirit of the implemented readability rules, that setting could've been called after what it does instead of a situation it's supposed to be set in. That would make it obvious why one would want to use it.

@nifadyev
Copy link

nifadyev commented Oct 4, 2024

Hey @sobolevn , is it right that setting should be renamed to be more explicit? Should one of these settings be set to False by default?

@sobolevn
Copy link
Member

sobolevn commented Oct 4, 2024

@nifadyev I agree that every rule should have its own setting. But, on the other hand, I don't want to affect users that already use this rule with the old setting.

So, the plan is:

  • Fix the docs
  • Add new settings for individual rules
  • Make sure that setting --i-control-code and -i-dont-control-code affects these new settings as they used to

@nifadyev
Copy link

nifadyev commented Oct 4, 2024

Thanks for the plan, i will try to work on it in next weeks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants