Commit Graph

412 Commits

Author SHA1 Message Date
Hynek Schlawack cee6192bd1
No periods in headings 2023-12-31 12:12:51 +01:00
Hynek Schlawack bfd70c9eeb
docs: make it a link 2023-12-31 11:36:01 +01:00
Hynek Schlawack bfbea3a901
docs: wordsmith 2023-12-31 11:34:25 +01:00
Hynek Schlawack 41df262f2d
Fix links 2023-12-31 07:19:11 +01:00
Hynek Schlawack 5688711bd8
Add social card 2023-12-31 07:04:02 +01:00
Hynek Schlawack c2ff96f554
Move sponsor logo hosting to docs
So we don't have to keep expired sponsors in the repo forever.
2023-12-30 11:55:50 +01: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 363ccf4821
docs: clean up index 2023-12-29 16:12:11 +01:00
Hynek Schlawack 84274fdecc
docs: add another slots caveat
Fixes #1211
2023-12-29 16:02:55 +01:00
diabolo-dan 597c3a8adb
Add support for cached_properties to slotted attrs classes. (#1200)
* Add support for cached_properties to slotted attrs classes.

* Remove locking from implementation

* Add test for multiple cached properties and fix bug

* Add changelog file

* Document slotted cached properties

* Add cached_property hypothesis check.

* Only run cached_property imports on python 3.8+

* Use cached _obj_setattr instead of `object.__setattr__`

* Correctly resolve mro for __getattr__ in cached properties

* Use _get_annotations rather than branching on class dict entry

* Optimise __getattr__ code by front loading branching, and injecting locasl variables

* Remove unnecessary `__attrs_original_getattr__` from class dictionary.

---------

Co-authored-by: Hynek Schlawack <hs@ox.cx>
2023-12-08 18:24:25 +00:00
Hynek Schlawack 0d1be891df
Build docs on 3.12 2023-11-28 13:26:27 +01:00
Hynek Schlawack c800d58f42
docs: typo 2023-11-23 08:29:37 +01:00
Hynek Schlawack bf357d6e67
Let's stand out 2023-11-23 08:28:31 +01:00
Hynek Schlawack c849440ac9
Add more cross-references 2023-10-18 08:39:24 +02:00
Hynek Schlawack 669b78a3fe
docs: explain how we compare (#1192) 2023-10-18 08:14:14 +02:00
Hynek Schlawack bd443b0191
doc: update statement in examples 2023-10-09 15:13:17 +02:00
Victor Song c2824ac30f
Pass args from `__init__` to `__attrs_pre_init__` if requested (#1187)
* Pass args from `__init__` to `__attrs_pre_init__` if requested

Detect if `__attrs_pre_init__` has arguments besides `self`
using `inspect.signature`. If so, pass `__attrs_pre_init__`
the same arguments that `__init__` (or `__attrs_init__`)
expects.

* Add changelog entry for `__attrs_pre_init__` args changes

* Don't use monkeypatch in new code

* Clarify docs

* Missed one monkeypatching

---------

Co-authored-by: Hynek Schlawack <hs@ox.cx>
2023-09-29 08:47:51 +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 1e751bab13
Add meta section 2023-08-15 09:51:08 +02:00
Hynek Schlawack cceb2d1104
Spread the gospel of -I 2023-08-15 09:48:27 +02:00
Hynek Schlawack 645b3023e8
Be clear in docs about in-dev 2023-07-09 14:25:19 +02:00
Hynek Schlawack e048e1b9e3
Disable 404ing edit button 2023-07-09 11:47:23 +02:00
Hynek Schlawack db76d51bcf
Fix API reference
Ref #1162
2023-07-09 11:33:00 +02:00
Sergei Lebedev 36d4762498
Switched from __dataclass_transform__() to typing.dataclass_transform() (#1158) 2023-07-06 18:41:45 +02:00
Hynek Schlawack 9ba7fad855
Update Pydantic to their new capitalization style 2023-06-13 09:59:16 +02:00
Hynek Schlawack 2b3a427147
Fix pyright for 1.1.311 (#1138)
They support converters now!
2023-06-03 12:12:03 +02:00
Hynek Schlawack a6778cf7aa
Remove outdated skip & version mention 2023-05-22 07:46:02 +02:00
Hynek Schlawack 7c44cfb3c1
Fix intersphinx (#1130) 2023-04-26 18:31:29 -06:00
Hynek Schlawack dadc020597
Fix links broken by pyright removing their transform spec 2023-04-16 12:15:50 +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
George Tantiras 5d9753a3b1
Slightly refined documentation while reading it (#1106)
* Fixed typos in why.md

* Rephrased introductory sentences

* Update init.md

* Update docs/init.md

* Update docs/init.md

* Update docs/init.md

---------

Co-authored-by: Hynek Schlawack <hs@ox.cx>
2023-03-18 12:03:36 +01:00
Hynek Schlawack c02d993f9d
Fix object index in API docs by splitting API docs in two (#1080)
* Fix object index in API docs

* Refactor API docs, prefer new namespace in examples

* Missed one

* Technically optional, practically confusing

* Simplify / clarify intro to API

* No need to make this clickable
2023-01-10 17:53:28 +01:00
Hynek Schlawack 906b732e23
Re-add attr and attrs ..module
But add it where it belongs: API

Fixes #1073
2023-01-02 16:27:37 +01:00
Hynek Schlawack 98aa688501
Clarify make_class argument type (#1075) 2023-01-02 08:50:57 +01:00
Hynek Schlawack 3a1367befa
Fix docset icons 2022-12-21 11:50:14 +01:00
Hynek Schlawack 566248a2d8
Don't linkcheck tree links 2022-12-21 09:59:37 +01:00
Hynek Schlawack 4ad4ea073f
Use MyST-native include 2022-12-20 10:47:48 +01:00
Hynek Schlawack 519423d94a
Use MyST-native doctest blocks in all MD 2022-12-20 10:46:32 +01:00
Hynek Schlawack 403adaba51
Remove stray file 2022-12-20 10:21:21 +01:00
Hynek Schlawack 6957e4a356
Use new typographic branding in the last rst file, too 2022-12-20 10:17:48 +01:00
Hynek Schlawack 1bb2864824
Convert examples.rst to md 2022-12-20 10:14:46 +01:00
Hynek Schlawack c1c24ccafb
Convert glossary.rst to md 2022-12-20 09:45:37 +01:00
Hynek Schlawack 9fd0f82ff0
Convert extending.rst to md 2022-12-20 09:28:31 +01:00
Hynek Schlawack 3473b4d3e2
Convert comparison.rst to md 2022-12-20 09:12:37 +01:00
Hynek Schlawack a760574795
Convert init.rst to md 2022-12-20 08:22:51 +01:00
Hynek Schlawack 2aff38afc4
Convert types.rst to md 2022-12-20 07:49:00 +01:00
Hynek Schlawack a09a6e7010
Convert how-does-it-work.rst to md 2022-12-20 07:34:58 +01:00
Hynek Schlawack 7fa9cd03d5
Convert overview.rst to md 2022-12-20 07:21:08 +01:00