Pylint complaining `abstract-class-instantiated` because of type hint stunt for `init`
See original GitHub issueEnvironment
How do you use Sentry? Sentry SaaS (sentry.io) or self-hosted/on-premise (which version?) Saas
Which SDK and version? python-sdk v1.0.0 in Python 3.9
Steps to Reproduce
In my code, I call
sentry_sdk.init(dsn=os.getenv('SENTRY_DSN')
I use pylint that just released a version 2.7.4
to statically check my code for lint errors
Expected Result
No lint error found (that was the case three weeks ago)
Actual Result
I get this pylint error
E0110: Abstract class 'init' with abstract methods instantiated (abstract-class-instantiated)
I believe this is due to the stunt to have nicer autocompletion that is now detected by pylint.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:19
- Comments:7 (1 by maintainers)
Top Results From Across the Web
abstract-class-instantiated / E0110 - Pylint 2.16.0-dev ...
Used when an abstract class with `abc.ABCMeta` as metaclass has abstract methods and is instantiated. Problematic code: import abc class Animal(abc.
Read more >Pylint W0223: Method ... is abstract in class ... but is not ...
For some reason pylint think the class isn't abstract (currenly detection is done by checking for method which raise NotImplementedError).
Read more >E0110 (abstract-class-instantiated) | pylint-errors - GitHub Pages
Rationale: Used when an abstract class with abc. ABCMeta or abc. ABC as metaclass has abstract methods and is instantiated.
Read more >Untitled
The primary use is for navigational items (nav bars, menus, etc), but it works well wherever small type is needed. In order to...
Read more >2012-February.txt - Python mailing list
Using metaclass to generate a class for each register also doesn't feel good, because you still need to instantiate them *once again* to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
mypy 0.950 now also shows an error for this:
error: Cannot instantiate abstract class "init" with abstract attribute "__exit__"
isn’t the fix straightforward?