Skip to content

Instantly share code, notes, and snippets.

@charlesfrye
Last active March 8, 2019 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charlesfrye/d4876151a11c59fa35c0dc821f7c1171 to your computer and use it in GitHub Desktop.
Save charlesfrye/d4876151a11c59fa35c0dc821f7c1171 to your computer and use it in GitHub Desktop.
import flake8
from flake8.formatting import base as formatter
from flake8.main import application as app
import flake8.options.config as config
application = app.Application()
application.parse_preliminary_options_and_args([])
flake8.configure_logging(
application.prelim_opts.verbose, application.prelim_opts.output_file
)
application.make_config_finder()
application.find_plugins()
application.register_plugin_options()
application.parse_configuration_and_cli([])
# output differs between Jupyter notebook and Python terminal
print(application.config_finder.local_config_files)
# output is the same between Jupyter notebook and Python terminal
cff = config.ConfigFileFinder(application.program_name, [], [])
print(cff.local_config_files())
@charlesfrye
Copy link
Author

charlesfrye commented Mar 8, 2019

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