Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Starting from a fresh clone, I faced these issues inside a no-cache build of the devcontainer:
isort
is missing when you try to runpython main.py
-> I added it to the poetry dev dependenciespre-commit run
doesn't work out of the box (see screenshot below). This is because the way the devcontainer is setup is a little odd:nicegui/.devcontainer/Dockerfile
Lines 30 to 31 in 3fcfac6
nicegui/
folder contents in/
which is registered as a Python module (due to thepoetry install
), leading to a circular import. The source files are not needed to setup the dependencies in the container, which can be achieved withpoetry install --all-extras --no-root
and just thepoetry.lock
..devcontainer
has an extra}
, causing this to never run:nicegui/.devcontainer/devcontainer.json
Lines 38 to 39 in 3fcfac6
}
and now it's correctly executed. Technically the devcontainer dockerfile wouldn't need to runpoetry
at all now which is worth considering.Something else I noticed but didn't want to touch because I don't know how it impacts CI/CD:
CONTRIBUTING.md
mentionsautopep8 --max-line-length=120 --in-place --recursive .
It would be nice if this was included in pre-commit to not have to run multiple commands before commit/push.