question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pylint hangs when running on a module that has type annotations from returns

See original GitHub issue

I’ve noticed pylint is hanging (vscode’s python plugin started to consume 100% CPU) when trying to lint a module that has type annotations from returns library.

Consider the following test.py:

from returns.maybe import Maybe, Some

x: Maybe[int] = Some(1)

Running pylint test.py will hang forever.

Not sure if the problem is with returns or pylint itself (or maybe something with my local setup, tried both with my regular pylint config and without it though). Didn’t spend much time debugging it, but sometimes I noticed it hangs in astroid.decorators.raise_if_nothing_inferred generator. Does anyone experience the same?

python: 3.7.9, 3.9.0
pylint: 2.6.0
astroid: 2.4.2
returns: 0.15.0

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
isratmircommented, Oct 31, 2021
1reaction
sobolevncommented, Oct 31, 2021

Please, report this on pylints repo! And post an issue number here. 👍

I can help pylint’s team, but there’s nothing we can do from our side.

Read more comments on GitHub >

github_iconTop Results From Across the Web

False positive ``syntax-error`` for badly placed type annotations
Expected behaviour is a code being able to run, with no errors shown. pylint --version output. 2.5.2. What I tried. I tried reload...
Read more >
Annotation issues at runtime - mypy 0.991 documentation
Annotation issues at runtime#. Idiomatic use of type annotations can sometimes run up against what a given version of Python considers legal code....
Read more >
What's New in Pylint 2.15 - Pylint 2.16.0-dev documentation
The returned module objects and errors that were cached by the ... Fix crash when a type-annotated __slots__ with no value is declared....
Read more >
typing — Support for type hints — Python 3.11.1 documentation
Source code: Lib/typing.py This module provides runtime support for type hints. ... PEPs have modified and enhanced Python's framework for type annotations.
Read more >
Understanding type annotation in Python - LogRocket Blog
To annotate return value type, add -> immediately after closing the ... in Python ≤3.8, you have to import it from the typing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found