Skip to content

Commit

Permalink
Pin astroid due to false no-name-in-module and no-member errors (
Browse files Browse the repository at this point in the history
…ansible#773)

Pin `astroid` due to false `no-name-in-module` and `no-member` errors

astroid >= 2.9.1, =< 2.9.3 (a pylint dependency) has a bug causing the reports of false-positive no-name-in-module and no-member rule violations.
This patch pins the respective transitive dependency to the last known good version of 2.9.0 as a temporary workaround.
It should be reverted as soon as the underlying upstream bug is fixed.
Ref: pylint-dev/pylint#5131
Related: ansible#772

Reviewed-by: Sviatoslav Sydorenko <webknjaz+github/profile@redhat.com>
Reviewed-by: None <None>
  • Loading branch information
cidrblock committed Jan 19, 2022
1 parent 4a1f8de commit 3ebe2b2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,18 @@ commands =
deps =
{[testenv]deps}
-r{toxinidir}/docs/requirements.in
# direct dependencies
pylint
pylint-pytest < 1.1.0

# indirect dependencies
# astroid is a transitive dep for pylint, > 2.9.0 introduces false no-name-in-module and no-member errors
# attempt to remove this when astroid 2.9.4 or later is released
# related: https://github.com/PyCQA/pylint/issues/5131
# related: https://github.com/ansible/ansible-navigator/issues/772
astroid == 2.9.0


[testenv:lint-vetting]
description =
Vetting newer quality standards under `{basepython}` ({envpython})
Expand Down

0 comments on commit 3ebe2b2

Please sign in to comment.