| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Hmm, really really odd that this passes in CI.
We have a TYPE_CHECKING guard here for mypy with an is not None assert, but pylint ignores that for its own type checks.
I see a bunch of false-positive issues reported on pylint about this, so it just seems to struggle with this. But also I'm confused why it works on CI 😁
It is failing in CI
Ah, good. I was referring to https://github.com/python-gitlab/python-gitlab/actions/runs/3276883032/jobs/5393461110, from main, which should have failed.
But I suspect there was an update in a transitive dependency that we do not track/freeze, that changed the behavior then.
- pylint develop-inst-noop: /home/runner/work/python-gitlab/python-gitlab
- pylint installed: argcomplete==2.0.0,astroid==2.12.11,attrs==22.1.0,black==22.10.0,certifi==2022.9.24,charset-normalizer==2.1.1,click==8.1.3,colorama==0.4.5,commitizen==2.35.0,decli==0.5.2,dill==0.3.5.1,flake8==5.0.4,idna==3.4,iniconfig==1.1.1,isort==5.10.1,Jinja2==3.1.2,lazy-object-proxy==1.7.1,MarkupSafe==2.1.1,mccabe==0.7.0,mypy==0.981,mypy-extensions==0.4.3,packaging==21.3,pathspec==0.10.1,platformdirs==2.5.2,pluggy==1.0.0,prompt-toolkit==3.0.31,py==1.11.0,pycodestyle==2.9.1,pyflakes==2.5.0,pylint==2.15.3,pyparsing==3.0.9,pytest==7.1.3,-e git+https://github.com/python-gitlab/python-gitlab@dd04e8ef7eee2793fba38a1eec019b00b3bb616e#egg=python_gitlab,PyYAML==6.0,questionary==1.10.0,requests==2.28.1,requests-toolbelt==0.10.0,termcolor==2.0.1,tomli==2.0.1,tomlkit==0.11.5,types-PyYAML==6.0.12,types-requests==2.28.11.2,types-setuptools==64.0.1,types-urllib3==1.26.25.1,typing_extensions==4.4.0,urllib3==1.26.12,wcwidth==0.2.5,wrapt==1.14.1
- pylint run-test-pre: PYTHONHASHSEED='3036645161'
+ pylint develop-inst-noop: /home/runner/work/python-gitlab/python-gitlab
+ pylint installed: argcomplete==2.0.0,astroid==2.12.12,attrs==22.1.0,black==22.10.0,certifi==2022.9.24,charset-normalizer==2.1.1,click==8.1.3,colorama==0.4.5,commitizen==2.35.0,decli==0.5.2,dill==0.3.5.1,flake8==5.0.4,idna==3.4,iniconfig==1.1.1,isort==5.10.1,Jinja2==3.1.2,lazy-object-proxy==1.7.1,MarkupSafe==2.1.1,mccabe==0.7.0,mypy==0.981,mypy-extensions==0.4.3,packaging==21.3,pathspec==0.10.1,platformdirs==2.5.2,pluggy==1.0.0,prompt-toolkit==3.0.31,py==1.11.0,pycodestyle==2.9.1,pyflakes==2.5.0,pylint==2.15.3,pyparsing==3.0.9,pytest==7.1.3,-e git+https://github.com/python-gitlab/python-gitlab@3a5d0779c469066b5d58c4296e6885973518072a#egg=python_gitlab,PyYAML==6.0,questionary==1.10.0,requests==2.28.1,requests-toolbelt==0.10.0,termcolor==2.0.1,tomli==2.0.1,tomlkit==0.11.5,types-PyYAML==6.0.12,types-requests==2.28.11.2,types-setuptools==64.0.1,types-urllib3==1.26.25.1,typing_extensions==4.4.0,urllib3==1.26.12,wcwidth==0.2.5,wrapt==1.14.1
+ pylint run-test-pre: PYTHONHASHSEED='2208336539'I'll say it's probably because of astroid, bumped from 2.12.11 to 2.12.12, as that does type inference for pylint IIRC. Could you pin that to .11 and try again @lmilbaum?
Same result in my DEV environment. Checking in CI.
Same result in CI
I pinned it to .12 which is the green one in your comment
Ah, sorry @lmilbaum. I wasn't very clear on that. The diff was from old to new looking at the logs in the CI runner. Downgrading to .11 should fix it IMO, as the .12 release was a few hours ago. https://github.com/PyCQA/astroid/releases/tag/v2.12.12
Fixed. BTW, are those errors reporting a real issue which needs to be addressed or is it a false positive situation? The question is a followup on your comment in the PR. Just to figure out if we want to track this issue.
I think it may be an issue for type checkers, not for runtime. It was already caught by mypy which probably does a better job at type checking, and we've added if TYPE_CHECKING: guards for that reason there already.
Maybe there's another way to fix that. I'd say we can keep this open to track it, but with very low priority from my perspective :)
| Back | FazBrowse Home | New Git URL |
tox -e pylint result:
************* Module gitlab.mixins
gitlab/mixins.py:121:19: E1102: self._obj_cls is not callable (not-callable)
gitlab/mixins.py:125:15: E1102: self._obj_cls is not callable (not-callable)
gitlab/mixins.py:158:15: E1102: self._obj_cls is not callable (not-callable)
gitlab/mixins.py:248:20: E1102: self._obj_cls is not callable (not-callable)
gitlab/mixins.py:304:15: E1102: self._obj_cls is not callable (not-callable)
gitlab/mixins.py:405:15: E1102: self._obj_cls is not callable (not-callable)
Your code has been rated at 9.94/10 (previous run: 10.00/10, -0.06)