Comments (3)
This is how documentation suggests to use the default decorator, with the example provided causing the same message to be reported for attrs 23.2.0 and pyright 1.1.351.
Originally posted by @Stealthii in #795 (comment)
Another instance of an interaction pattern that's correct runtime behavior, but actually a pyright
issue.
from attrs.
@hynek I totally appreciate how frustrating some of these redirects from pyright
can be, as you mention in the issue referenced above. I think it would be useful to expand the public-facing attrs docs to include specific examples of some pyright
/attrs
interaction patterns, including a description of the the intended semantics of the PEP681/pyright
interaction.
Then, hopefully, redirects coming in from the pyright
issue tracker can start there and be filed as doc-requests rather than attrs issues.
As the "one who opened the box" on some of this in #795 I'd happily step-up to write this if you're keen.
I'll also volunteer to triage (and address) doc issues of this type in the attrs issue tracker.
from attrs.
I've been thinking about it for a while, but I kinda didn't come up with anything how to do it. Do you already have something more concrete on your mind?
from attrs.
Related Issues (20)
- make_class(): Populate the __annotations__ dict HOT 3
- License file not included in distribution HOT 1
- Using `typing.Annotated` HOT 5
- Pyright 1.1.359 broke our CI
- Mypy 1.10 broke our CI
- Error from mypy when using converters in a list HOT 6
- Crash when annotating type with the python syntax (a: T = attrib()) HOT 2
- modulenotfounderror: no module named attrs for version 21.2.0 HOT 1
- `kw_only` with `default` breaks `__attrs_pre_init__` call
- Add "resolve_types" argument to attrs.define() HOT 2
- Typing error when defining an enum of an attrs class HOT 2
- `__getattr__` in child class gets called when mixed with `cached_property` HOT 10
- Pass kwargs to __attrs_pre_init__() HOT 1
- [Feature Request] Mechanism for adding per-attribute docstrings to __slots__
- `attr.filters.exclude` or `include` not simultaneously usable with `validators.in_` set. HOT 3
- Suggestion: Consider changing the order for variable initialization in `__init__` HOT 1
- mypy infers `attrs.fields(type(attrs_instance))` as `Any` HOT 1
- Unpack List[<some attrs class>] HOT 2
- Adding docstrings to classes created with `make_class` HOT 5
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 attrs.