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

Use extend-exclude for flake8 and black #348

Merged
merged 3 commits into from
Sep 14, 2021

Conversation

apaleyes
Copy link
Collaborator

This PR makes a bit more extensive use of extend-exclude option, pun intended.

I've hit a couple of issues running all format checks because in my dev setup .venv lives in the project root. So both tools would validated files inside this .venv.

Black by default can respect .gitignore file, which covers .venv, .tox and many more. But if you use exclude option, this default behavior is overriden. So for black we simply use extend-exclude instead of exclude, and then clean up in other places.

flake8 doesn't respect .gitignore at all, but it has sensbile defaults that cover .tox. Thus for flake8 we only need to add .venv to the list of excludes, with the same extend-exclude option.

While this is wasn't an issue in Trieste development so far, I argue it would very contributor-friendly to support .venv in project root, as this setup is quite popular.

Copy link
Collaborator

@hstojic hstojic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks reasonable to me, thanks for spotting this!

@hstojic
Copy link
Collaborator

hstojic commented Sep 13, 2021

ready for merging in?

@apaleyes
Copy link
Collaborator Author

Thanks, @hstojic ! I can't merge it in myself though

@vpicheny vpicheny merged commit 9a522d7 into secondmind-labs:develop Sep 14, 2021
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.

3 participants