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

Already on GitHub? Sign in to your account

Missing dependency injection in StyleGuide #79

myint opened this Issue Jun 14, 2012 · 4 comments


None yet
2 participants

myint commented Jun 14, 2012

StyleGuide seems to be currently hard coded to pass in "arglist=None" to process_options(). This results in StyleGuide indirectly reading from sys.argv.


florentx commented Jun 14, 2012


I want to understant the use case behind.
Currently, the sys.argv is never read, unless the flag parse_argv=True is passed to the constructor.
The StyleGuide instance can be built with dict-like arguments.



myint commented Jun 14, 2012

The use case involves passing options to pep8.

I tried using process_options() directly without StyleGuide initially, but that resulted in some error about options.physical_checks being missing. Then I tried monkey patching options.physical_checks and couldn't get it to work properly.

Any suggestions about how to do this properly would be helpful.



florentx commented Jun 14, 2012

This is how I intend to use it:

Probably this breaks, since I did not test it.
Let me know if I need to do more or if you can catch on it.

I have committed the BaseReport.result to better support this.


myint commented Jun 15, 2012

Thanks! I needed to make a slight change, but it works now.

@myint myint closed this Jun 15, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment