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

Add command-line option for custom config file (#11) #11

Merged

Conversation

justcallmelarry
Copy link
Contributor

Changes

Add a separate CLI option called --pyproject-file, based on the way flake8-black handles the same issue, ie config file type not being supported by flake8 in the first place.

Open questions/issues

  • Is the config option aptly named? Should it be named something else?
  • The config option completely ignores other config files, no thoughts on having it work together with a tox.ini or a in-directory pyproject.toml has been considered.

Testing

  • Added unit tests to see that it works as expected
  • Running locally in a monorepo to see that VSCode does in fact get the config from a subdirectory

flake8p/hook.py Outdated Show resolved Hide resolved
@john-hen john-hen changed the title Add custom config option Add command-line option for custom config file (#11) Nov 12, 2022
@john-hen john-hen merged commit add99e8 into john-hen:main Nov 12, 2022
@john-hen
Copy link
Owner

Sorry, took a while to merge and release. I was very busy the last few months and finally had a few days off.

I renamed the option to --toml-config in the end, somehow liked that a little better. The override behavior is fine, we can just ignore other config files in this case, the way I see it.

Thanks again, @justcallmelarry .

@justcallmelarry justcallmelarry deleted the feature/add-custom-config-option branch January 25, 2023 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants