Comments (1)
Original comment by Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore):
First of all, the example is wrong, it should have been this:
#!python
class Foo(object):
def __init__(self):
self._bar = 3
@property
def bar(self):
return self._bar
@bar.setter
def bar(self, value):
self._bar = value
class Foo2(Foo):
@Foo.bar.setter
def bar(self, value):
self._bar = value * 2
This is rather an exaggerated use of a parent's setter. This can be cleaner by using a template method, which is used in the setter and reimplemented by each subclass. Since it's such an edge case, it's not worth supporting in Pylint.
from pylint.
Related Issues (20)
- Pylint 3.1.0 reports ByteString as deprecated class when ``py-version = 3.8`` HOT 3
- Cannot disable 'cyclic-import' warning HOT 1
- False-positive E0:601 on `datetime` when USE_TYPECHECKING HOT 1
- Wrong string missing method when defining with round brackets
- Check for pylint pragmas in `__init__.py` HOT 2
- Non existent member not detected on datetime.datetime
- Check "__slots__" and "@dataclass" attributes HOT 2
- ERROR: Could not install packages due to an OSError HOT 1
- Add a dynamic URL to the message documentation in the message descriptions from checkers HOT 12
- Using truethy coroutine in if-clause should trigger a warning HOT 5
- cannot disable checks right after "else:" HOT 1
- Changing the number of function arguments when using a decorator does not work. HOT 2
- Document the setting of the ``sys/PYTHONPATH`` in our doc and on a popular stackoverflow answer
- Detect useless copy/deepcopy HOT 1
- Proposal: ignore concrete linting warnings via GUI, e.g. via QuickFix in VSCode HOT 2
- Misleading documentation for "protected-access / W0212" HOT 8
- False negative for used-before-assignment and unused-argument when used in inner function without nonlocal HOT 4
- 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
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.