1

I have created many tests and all working fine on local and gihub CI but while check PyLint I'm getting this error RecursionError: maximum recursion depth exceeded in comparison.

I would be great if you can help me.

command running on server:

DJANGO_SETTINGS_MODULE=projectname.settings.test_set pylint --generated-members=viridis --load-plugins pylint_django project/apps/* --errors-only

Error:

  File "/opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/site-packages/astroid/decorators.py", line 96, in wrapped
    res = next(generator)
  File "/opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/site-packages/astroid/bases.py", line 136, in _infer_stmts
    for inferred in stmt.infer(context=context):
  File "/opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/site-packages/astroid/util.py", line 160, in limit_inference
    yield from islice(iterator, size)
  File "/opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/site-packages/astroid/context.py", line 113, in cache_generator
    for result in generator:
  File "/opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/site-packages/astroid/decorators.py", line 132, in raise_if_nothing_inferred
    yield next(generator)
  File "/opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/site-packages/astroid/decorators.py", line 89, in wrapped
    if context.push(node):
  File "/opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/site-packages/astroid/context.py", line 89, in push
    if (node, name) in self.path:
RecursionError: maximum recursion depth exceeded in comparison
"""
Mr Singh
  • 3,936
  • 5
  • 41
  • 60

1 Answers1

1

This bug was fixed in this PR: https://github.com/PyCQA/astroid/pull/733

Either make sure that you are using a version released after this fix or try downgrading astroid to version 2.2.5

Ahmed
  • 11
  • 1