bitter-ability-32190
11/10/2021, 9:33 PMpylint
differences:
I'm seeing ./pants lint
and pylint
(in my ve
) disagree.
pylint
in ve is fine,
./pants
says [E1101(no-member), AClass.delete] Instance of 'scoped_session' has no 'commit' member
The code in question is essentially:
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
...
db.session.commit()
I've set my pants.toml
to match the ve
's deps (I think it's a representative set)
[pylint]
version = "pylint==2.6.0"
lockfile = "3rdparty/pylint_lockfile.txt"
extra_requirements.add = [
"astroid==2.4.2",
"flask==1.1.2",
"flask-sqlalchemy==2.4.4",
"mccabe==0.6.1",
"pylint-flask-sqlalchemy==0.2.0",
]
hundreds-father-404
11/10/2021, 9:34 PMbitter-ability-32190
11/10/2021, 9:35 PMbitter-ability-32190
11/10/2021, 9:35 PMload-plugins=pylint_flask_sqlalchemy
hundreds-father-404
11/10/2021, 9:36 PM--no-process-execution-local-cleanup
and inspect the chroot to make sure the config file is therebitter-ability-32190
11/10/2021, 9:36 PMhundreds-father-404
11/10/2021, 9:37 PM--no-local-cleanup
in the pastbitter-ability-32190
11/10/2021, 9:39 PM--leak-chroot
bitter-ability-32190
11/10/2021, 9:40 PMpylintrc
is therebitter-ability-32190
11/10/2021, 9:41 PMpylint.pex
hundreds-father-404
11/10/2021, 9:44 PMpip -r lockfile.txt
and see if you can get Pylint passing that way stillbitter-ability-32190
11/10/2021, 9:44 PMflask-sqlachemy
in requirements.pex
(but I DO see it in pylint.pex
) 🤔hundreds-father-404
11/10/2021, 9:44 PMpip -r lockfile.txt
wouldn't include your third-party requirements thobitter-ability-32190
11/10/2021, 9:45 PMhundreds-father-404
11/10/2021, 9:45 PMOddly I don't see flask-sqlachemy in requirements.pexProbably shouldn't matter. We use a PEX feature to merge
requirements.pex
and pylint.pex
into a single pylint_runner.pex
bitter-ability-32190
11/10/2021, 9:47 PMbitter-ability-32190
11/10/2021, 9:48 PMpylint
lockfile I see the error. We're probably on to somethingbitter-ability-32190
11/10/2021, 10:02 PMsqlalchemy
in the pylint
reqs. I pinned it to the `ve`'s (must've missed this) and now it worksbitter-ability-32190
11/10/2021, 10:03 PMpylint
is clean on our monorepo. One step closer to adoptionhundreds-father-404
11/10/2021, 10:11 PMOne step closer to adoptionYay! Although I'll point out that you already have adopted Pants! Pants is meant to be useful even if you're only using it for things like installing and running your linters/formatters. It's not all-or-nothing
bitter-ability-32190
11/10/2021, 10:15 PMbitter-ability-32190
11/10/2021, 10:15 PMbitter-ability-32190
11/10/2021, 10:19 PM