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

Merge branch dev/pre-commit-hook #156

Open
wants to merge 4 commits into
base: Develop
Choose a base branch
from

Conversation

gierle
Copy link
Contributor

@gierle gierle commented Feb 3, 2023

Add uniform style guide based on conventional commits and AngularJS.
Add optional tools:

  • gitlint - enforces commit-msg style before commiting
  • pre-commit - runs linting, type checking and minor issue fixing

Revise pre-commit hook configuration

# According to this blog post (https://jaredkhan.com/blog/mypy-pre-commit)
# one should consider running mypy on all files rather than on only the committed changes
# since the changes can break dependencies elsewhere (e.g. function naming)
- repo: https://github.com/pre-commit/mirrors-mypy
Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree. Cleaning up the entire repo with mypy is an item on our list. We should enforce mypy in pre-commit hooks only once we've done that.

rev: 22.12.0
hooks:
- id: black-jupyter # supports .py and .ipynb files
args: [--line-length=79, --target-version=py37]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Optimal line length is a bitterly contested subject, but I personally find 79 to be too short. I've seen other projects that use 88. I'd much prefer that.

Changes:
- line length 79->88
- stop enforcing mypy in pre-commit hooks, until the repo is cleaned using mypy
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