You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When linting an absltest-based test suite with pylint, I am now getting the following message:
************* Module lint_bug
lint_bug.py:8:0: E0611: No name 'absltest' in module 'absl.testing' (no-name-in-module)
This has only started as of absl-py==0.9.0, and requires the type declaration for TestCase.enter_context, # type: (ContextManager[_T]) -> _T, be present in absltest.py.
It looks a bit like this is actually a fault with pylint, but have not been able to create a standalone reproduction case at this point. The code -- both the reduced fragment below and my original test suite -- run correctly. (And pytest is happy with them as well.)
The source for lint_bug.py is:
"""Show an unexpected pylint error with absltest.
There is an unexpected no-name-in-module with absl-py==0.9.0.
pip3 install pylint==2.4.4 absl-py==0.9.0
python3 -m pylint lint_bug.py
"""
from absl.testing import absltest
if __name__ == '__main__':
absltest.main()
The text was updated successfully, but these errors were encountered:
When linting an
absltest
-based test suite withpylint
, I am now getting the following message:This has only started as of
absl-py==0.9.0
, and requires the type declaration forTestCase.enter_context
,# type: (ContextManager[_T]) -> _T
, be present inabsltest.py
.It looks a bit like this is actually a fault with
pylint
, but have not been able to create a standalone reproduction case at this point. The code -- both the reduced fragment below and my original test suite -- run correctly. (And pytest is happy with them as well.)The source for
lint_bug.py
is:The text was updated successfully, but these errors were encountered: