Commit Graph

12 Commits

Author SHA1 Message Date
Hynek Schlawack 6733796c5f
Add nuance to subclassing statements
C.f.
https://stackoverflow.com/questions/78424953/how-to-implement-class-composition/78427868?noredirect=1#comment138293629_78427868
2024-07-19 11:11:48 +02:00
Hynek Schlawack f590f44cfd
docs: style improvements 2024-03-16 16:22:58 +01:00
Carlton Gibson 1cb58a5536
Fixed make_class example. (#1258)
The example only makes sense if `C2` is the class examined, as that's the one we dynamically created.
2024-03-12 18:12:43 +00:00
Brian Pugh 5aea24125a
Move conditional clause to beginning for validator/converter docs. (#1213)
Move conditional clause to beginning for validator/converter docs. Provide converter example.

Co-authored-by: Hynek Schlawack <hs@ox.cx>
2023-12-29 15:48:42 +00:00
Hynek Schlawack 4c2b9e31bc
docs: add two warning about no-types mode
Fixes #1161
2023-12-29 16:30:21 +01:00
Hynek Schlawack bd443b0191
doc: update statement in examples 2023-10-09 15:13:17 +02:00
Why-not-now 940dd1fdbb
Update examples.md (#1163)
* Update examples.md

Changing order type annotations to fit code
Added attrs.define implementation to slots category

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update docs/examples.md

Co-authored-by: Hynek Schlawack <hs@ox.cx>

* Update docs/examples.md

Co-authored-by: Hynek Schlawack <hs@ox.cx>

* revert test_annotations.py

* Revert test_annotations.py

removed space

---------

Co-authored-by: Hynek Schlawack <hs@ox.cx>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-17 05:57:43 +02:00
Hynek Schlawack db76d51bcf
Fix API reference
Ref #1162
2023-07-09 11:33:00 +02:00
Lanqing Huang c4c6fdd658
Add literal string support to include and exclude filters (#1068)
* Add literal string support to includer and exclude filters

* Add docs and changelog for new feature

* Fix typo in `typing_example`

* Add a note to document typo issues while using literal name strings as filter args

* Add more docs

* Add code mark for `AttributeError`

* Fix grammar error and upgrade `versionchanged` info

* Improve docs and examples from
hynek's comments

* Keep example cases the same

* More examples

* Apply suggestions from code review

Co-authored-by: chrysle <fritzihab@posteo.de>

---------

Co-authored-by: Hynek Schlawack <hs@ox.cx>
Co-authored-by: chrysle <fritzihab@posteo.de>
2023-04-14 08:54:31 +00:00
chrysle 65ee286d6a
Added `type` parameter to `attrs.field()` function (#1107)
* Added `type` parameter to `attrs.field` and test

* Added notice in examples.md

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Added changelog entry

* Fixed docs

* Apply suggestions from code review

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Hynek Schlawack <hs@ox.cx>
2023-04-03 14:40:45 +00:00
Hynek Schlawack 519423d94a
Use MyST-native doctest blocks in all MD 2022-12-20 10:46:32 +01:00
Hynek Schlawack 1bb2864824
Convert examples.rst to md 2022-12-20 10:14:46 +01:00