-
Notifications
You must be signed in to change notification settings - Fork 10
Pre-commit update #36
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,6 @@ | |
|
|
||
| __all__ = [ | ||
| "EngineType", | ||
| "load_project_class", | ||
| "ProjectDict", | ||
| "load_project_class", | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,6 @@ classifiers = [ | |
| keywords = ["aiida", "workflows"] | ||
| requires-python = ">=3.9" | ||
| dependencies = [ | ||
| "py~=1.11", | ||
| "pydantic~=2.7", | ||
| "pydantic-settings~=2.2", | ||
| "python-dotenv~=1.0", | ||
|
|
@@ -48,11 +47,36 @@ dev = [ | |
| "types-pyyaml~=6.0", | ||
| ] | ||
|
|
||
| [dependency-groups] | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This makes development with So e.g. one can run For a general info about the (new) concept of "dependency groups" see PEP-735. In principle this should obviate the need for the (feel free to split this comment into a separate commit :-) )
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Haha, well, if you insist! 😉 Thanks for the note on "dependency groups"! Always good to read a PEP in the morning. |
||
| dev = [ | ||
| "aiida-project[dev]", | ||
| ] | ||
|
|
||
| [tool.mypy] | ||
| plugins = ['pydantic.mypy'] | ||
|
|
||
| [tool.black] | ||
| line-length = 100 | ||
|
|
||
| [tool.ruff] | ||
| line-length = 100 | ||
|
|
||
| [tool.ruff.lint] | ||
| # TODO: PLW1510 should be enabled and fixed! | ||
| # See `ruff rule PLW1510` | ||
| ignore = [ | ||
| 'PLW2901', # `for` loop variable overwritten by assignment target | ||
| 'PLW1510', # `subprocess.run` without explicit `check` argument | ||
| 'PLC0415', # `import` should be at the top-level of a file | ||
| ] | ||
|
|
||
| select = [ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Heh, I actually didn't know you had to |
||
| 'E', # pydocstyle | ||
| 'W', # pydocstyle | ||
| 'F', # pyflakes | ||
| 'I', # isort | ||
| 'N', # pep8-naming | ||
| 'UP', # pyupgrade | ||
| 'PLC', # pylint-convention | ||
| 'PLE', # pylint-error | ||
| 'PLR', # pylint-refactor | ||
| 'PLW', # pylint-warning | ||
| 'RUF', # ruff-specific rules | ||
| ] | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need these old hooks when we switch to Ruff? I think we can also remove the
excludeabove.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are still useful for non-python files, but it's up to you if that is worth it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, I missed the indent. Let's leave them for now, I'll experiment with it later 👍