Skip to content

Add precommit configuration and refactor files - #182

Merged
amochin merged 1 commit into
MarketSquare:masterfrom
bhirsz:refactor_with_precommits
Oct 13, 2023
Merged

amochin merged 1 commit into
MarketSquare:masterfrom
bhirsz:refactor_with_precommits

Conversation

@bhirsz

@bhirsz bhirsz commented Aug 8, 2023

Copy link
Copy Markdown
Member

I have several ideas for improvements and fixes in this repository. However I think it would be beneficial to follow the same coding standard when contributing to the repository first. For that purpose I have added precommit configuration and run it on all files.

To use it when developing locally:

Install precommit package:

pip install pre-commit

Install in the repository root:

pre-commit install

From now on every commit will run black and isort tools to autoformat the code (first run after installation will take the longest, next ones should be seconds). If the formatters end up formatting the file, the commit will be cancelled and need to be redone.

In the future we can add Github action to verify if new PRs used precommits to autoformat the files.

@amochin
amochin merged commit 123bc4c into MarketSquare:master Oct 13, 2023
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