Wemake-python-styleguide: Create configuration

Created on 11 Jun 2018  路  11Comments  路  Source: wemake-services/wemake-python-styleguide

Currently our linter is full of magic constants like:

What we need is:

  1. create a file with default configuration values
  2. allow users to override these values with setup.cfg or any other standard flake8 tools
  3. test that when configuration is applied linter respects it
feature help wanted starter

Most helpful comment

@sobolevn Well, we've got plans. Pleeease don't take it as an insult.

The idea is to store the projects we didn't want to write, but absolutely had to.

All 11 comments

How about that all the configs will be placed in setup.cfg, and there will be some parser that will put the settings in the specific visitor?

Yes, that's exactly how I see this feature.

@mcproger are you interested in implementing this feature?

Yes, I will try to implement this.

Great!

Please, ask any questions you have.

Things to keep in mind:

  • [ ] we will need to test config parsing is correct
  • [ ] we will need to test that config values take effect on actual checks
  • [ ] we will need to provide some basic docs, like: there are values a, b, and c, they must be placed in setup.cfg under [..] section

OK, I'll try to present my first PR as soon as possible.

I have no idea, that was other me: the bad one 馃槅

offtop: the idea seams familiar https://github.com/wemake-shit

We were inspired by this https://github.com/sobolevn/python-code-disasters 馃槅

@sobolevn Well, we've got plans. Pleeease don't take it as an insult.

The idea is to store the projects we didn't want to write, but absolutely had to.

No worries! We all have these projects.

</offtop>

Was this page helpful?
0 / 5 - 0 ratings