Comments (7)
Possibly related: #9420
from pylint.
ABC1 has an additional public method "getitem". Is that what you find unexpected that pylint counted?
from pylint.
class Test has two public methods: __getitem__
and method1
(no warning, as expected)
class MyABC1 has two public methods: getitem
and method1
(no warning, as expected)
class MyABC2 has two public methods: __getitem__
and method1
(no warning, as expected)
class Concrete1 implements the abstract method method1
of MyABC1 (no warning, as expected)
class Concrete2 implements the abstract method method1
of MyABC2 (warning, unexpected)
from pylint.
Ah, if the difference is just that too-few-public-methods thinks anything that starts with _
is private even if it's a dunder, then that's just #9420.
from pylint.
According to this logic ("too-few-public-methods thinks anything that starts with _ is private"), then there should be a warning for class Test
- but there is not. (same for class MyABC2
)
from pylint.
Apologies, I took #9420 at face value, but I cannot reproduce the behavior described there. Dunders besides __init__()
are counted as public methods, so that explains why Test
doesn't raise a warning.
from pylint.
Apparently, inherited dunders are not counted. If that's the part you'd like us to reconsider, I'm happy to reopen the issue for additional discussion.
from pylint.
Related Issues (20)
- Pylint failed to detect undefined variable value HOT 1
- [unsubscriptable-object] False Positive on Optional list HOT 1
- Streamlit page with ChatBot Langchain and Bedrock HOT 1
- Missing timeout for requests.Session object? HOT 1
- False positive for missing-kwoa (E1125) on inherited dataclasses with kw_only=True HOT 2
- [no-value-for-parameter] False negative when calling `super().__init__()` with non-self argument HOT 1
- PyLint reports "no assignment is done" but variable is changed in the scope of the procedure HOT 4
- [MacOS] astroid.exceptions.AstroidError thrown when multi-processing
- Crash: Fatal error while checking 'models.py' HOT 1
- ``astroid.exceptions.AstroidError thrown when typing NoReturn is imported`` HOT 1
- Detect useless f-strings HOT 7
- E1520 recommends an invalid combination of `@singledispatch` and `@staticmethod`
- Detect possible simplifications using walrus HOT 1
- False positive `deprecated-class` when the class is imported in a guarded import block
- AstroidError HOT 5
- Pylint doesn't run in parallel if -j=0 is specified HOT 5
- Erroneous `not-an-iterable` when inheriting from `NamedTuple` HOT 3
- Add a specifier for alerts that are linked to a library HOT 36
- Crash from typing import Optional HOT 2
- "no-member" not triggered for C-extension member but "--unsafe-load-any-extension=y"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pylint.