Comments (2)
Thanks for asking.
how would you name this new message ?
I wonder that there still is an assigning-non-slot. Regarding that existing name I would suggest using declare-non-slot
(or define-non-slot
). I can't diffrenciate between declare and define.
For the docs and based on assigning-non-slot
:
Problematic code
class Student:
__slots__ = ("name",)
name: str
surname: str # [define-non-slot]
Correct code:
class Student:
__slots__ = ("name", "surname")
name: str
surname: str
from pylint.
Thank you for opening the issue, how would you name this new message ?
There is already some slot related messages in the classe checker (https://github.com/pylint-dev/pylint/blob/main/pylint/checkers/classes/class_checker.py#L665), but it seems it could go in the data classes checker (https://github.com/pylint-dev/pylint/blob/main/pylint/checkers/dataclass_checker.py)
from pylint.
Related Issues (20)
- 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
- 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
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.