-
Notifications
You must be signed in to change notification settings - Fork 7
Allow ruff-vscode to fix notebooks again #2047
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
Conversation
| test-ribasim-core-cov = { cmd = "julia --project=core --eval 'using Pkg; Pkg.test(coverage=true, julia_args=[\"--check-bounds=yes\"])'", depends-on = [ | ||
| "generate-testmodels", | ||
| ] } | ||
| ], env = { SSL_CERT_DIR = "", JULIA_SSL_CA_ROOTS_PATH = "" } } |
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.
Unrelated, but this is needed to be able to use branches in our Manifest.toml, found in #2046.
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.
Could this break other uses cases (TC?) and if needed, for branches, it would probably be required for all Julia related tasks, not just core-cov?
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.
No this is just when Pkg uses LibGit2 to checkout a branch. The other tasks that may need this already have this set. We can remove this again when JuliaLang/julia#56924 is merged.
| "notebook.formatOnSave.enabled": true, | ||
| "notebook.codeActionsOnSave": { | ||
| // https://github.com/astral-sh/ruff-vscode/issues/593 | ||
| "source.fixAll.ruff": "never", | ||
| "source.organizeImports.ruff": "never" | ||
| "notebook.source.fixAll": "explicit", | ||
| "notebook.source.organizeImports": "explicit" |
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.
This was disabled due to the linked issue. Prefixing notebook as suggested there fixes the problem for me. The postfix ruff is removed, It is a way for ruff-vscode to avoid allowing other extensions to run on-save. That is not the default way to do it and I don't think there is an issue with that.
| "source.fixAll": "explicit", | ||
| "source.organizeImports": "explicit" |
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.
Lets do this as well, rather than wait for pre-commit to do it.
| @@ -1,5 +1,4 @@ | |||
| exclude = ["ribasim_qgis/tomllib/*"] | |||
| extend-include = ["*.ipynb"] | |||
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.
This has been the default since ruff 0.6: https://astral.sh/blog/ruff-v0.6.0#jupyter-notebooks-are-now-linted-and-formatted-by-default
No description provided.