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.
When trying to use this plugin, I found a few issues that this PR resolves:
TLDR:
I fixed two things and added two CI jobs to make your life easier. See https://github.com/iFreilicht/pylint_flask_sqlalchemy/actions/runs/2028803993
You can also download the built wheel and tar.gz distributions there.
Issues
1. The
tests
directory is installed as an additional package, breaking linting on all my testsAfter installing this plugin, the errors relating to
flask_sqlalchemy
were fixed, but I got a new issue:The reason for these is that
pylint_flask_sqlalchemy
actually installs two packages:Because tests is now an installed package in my venv, python will consider it first when searching for the
tests
module during import, meaning pylint tries to lint that, but fails.2. Building a wheel with
build
builds an empty wheelBecause there was no build process documented but I saw a
pyproject.toml
, I thought I could usebuild
to debug the issue myself. As it turns out, that builds an empty wheel:3. No CI job for building
This is not really an issue per se, but it might help you get started with the distribution job you mention in #13. As an additonal resource, this github actions config should help you out.
Fix explanation
This was fixed by explicitly setting
packages = pylint_flask_sqlalchemy
insetup.cfg
. After downloading the built wheel from the finished github workflow or installing directly through git, you can see the difference:I also added a job to the CI pipeline to check for empty wheels the way I did to avoid a potential future regression.