Part of the 2.0 redesign (in my mind) was to open up the avenue of having an API as part of Flake8 to allow people to do fun stuff with it. Unfortunately it seems we did not open it enough. Take a look at this issue on pep8: https://github.com/jcrocholl/pep8/pull/181. It's an odd request but it makes some sense to allow people to pass their own everything to Flake8 using our tools. I have a few ideas about how to make this easier for others to extend, but I'm not sure if they're overkill or not. The first is to have main create a StyleGuide and pass it to a function that does the rest of main with the StyleGuide that was passed in. This allows people to use `get_style_guide` to retrieve a StyleGuide with their own options and do all kinds of wonderful (horrible) things to it and then uses it to execute main. The issue with this is they could ostensibly remove options or methods that main currently relies on (and therefore this other function would rely on). The second is not much different but would allow main to directly take **kwargs and merge those with what we pass to `get_style_guide` (this is actually Florent's idea). The former feels more flexible and yet dangerous, the other seems less flexible but almost flexible enough for what seems to be the current use case. Any and all opinions are welcome. Thanks, Ian P.S. Anyone with Mercurial extension experience, please contact me separately. ;-)
participants (1)
-
Ian Cordasco