FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

pylint check is broken with astroid 2.12.12 · Issue #2334 · python-gitlab/python-gitlab · GitHub

Repository navigation

pylint check is broken with astroid 2.12.12 #2334

Description

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)

Activity

  1. nejch commented on Oct 19, 2022

    Member

    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.

  2. nejch commented on Oct 19, 2022

    Member

    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 😁

  3. lmilbaum commented on Oct 19, 2022

    Author

    It is failing in CI

  4. nejch commented on Oct 19, 2022

    Member

    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.

  5. nejch commented on Oct 19, 2022

    Member
    - 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?

  6. lmilbaum commented on Oct 19, 2022

    Author

    Same result in my DEV environment. Checking in CI.

  7. lmilbaum commented on Oct 19, 2022

    Author

    Same result in CI

  8. lmilbaum commented on Oct 19, 2022

    Author

    I pinned it to .12 which is the green one in your comment

  9. nejch commented on Oct 19, 2022

    Member

    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

  10. lmilbaum commented on Oct 19, 2022

    Author

    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.

  11. nejch commented on Oct 19, 2022

    Member

    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 :)

  12. changed the title [-]pylint check is broken[/-] [+]pylint check is broken with astroid 2.12.12[/+] on Oct 19, 2022
  13. added a commit that references this issue on Oct 19, 2022
    f0c02a5
  14. locked as resolved and limited conversation to collaborators on Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL