Skip to content

Conversation

@JanAdamiak
Copy link
Contributor

@JanAdamiak JanAdamiak commented Sep 30, 2023

This PR adds precommit to the project.
Also adds a linting workflow that uses precommit.
There's a lot of file diffs in this one, that got picked up by the precommit's changes.

Let me know if you are okay with those ruff settings and precommit hooks?

Also should I add a precommit file and settings for it to the generated project?

Setting this one as draft until @pydanny replies to the questions above.

Copy link
Owner

@pydanny pydanny left a comment

Choose a reason for hiding this comment

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

@JanAdamiak, this is AWESOME! 💯

There's just one problem, the changing of the order in cookiecutter.json breaks the intended workflow and will also throw errors. Can you skip that file in the pre-commit process?

Thanks!

@@ -1,13 +1,23 @@
{
"full_name": "Daniel Roy Greenfeld",
"__gh_slug": "{{ cookiecutter.github_username }}/{{ cookiecutter.slug }}",
Copy link
Owner

Choose a reason for hiding this comment

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

This is a bug which will cause Cookiecutter to behave erratically or throw an error. This is because the __gh_slug element requires earlier items.

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Copy link
Owner

@pydanny pydanny Oct 1, 2023

Choose a reason for hiding this comment

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

Please add hook to exclude cookiecutter.json from the linting process.

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