Commit Graph

17 Commits

Author SHA1 Message Date
Tin Tvrtković d7d9c5dde7
Switch to NG APIs in docs (#863)
* Switch to NG APIs in docs

* Review feedback

* Convert examples.rst

* Tweak doctest

* Doctest fixes

* Tweak some more

* Fix

* Update docs/init.rst

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

* Fix doctest

* Fix README

* Update docs/examples.rst

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

* Review feedback

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

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

* Fix link

Co-authored-by: Hynek Schlawack <hs@ox.cx>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-22 07:35:36 +01:00
Hynek Schlawack 2f6fd8516c
Add on_setattr hooks to attr.s and attr.ib (#660)
* Add on_setattr hooks to attr.s and attr.ib

Signed-off-by: Hynek Schlawack <hs@ox.cx>

* Add PR newsfragment

* Fix attr.s doc sig

* Make _DisableType private

* Mark setters.frozen as NoReturn

* Rename setters.DISABLE to setters.NO_OP to clarify its purpose

DISABLE sounds less purposeful and doesn't convey its meaning as well.

* Fix type

* Loosen up type for convert even further

* Tighten type a tiny bit
2020-07-20 12:43:10 +02:00
Kyle Altendorf 3fff9ee352 Mention attr.fields() after __attrs_attrs__ in 'How does it work' (#605)
* Mention attr.fields() after __attrs_attrs__ in 'How does it work'

The mentioning of __attrs_attrs__ in a 'how does it work' document makes sense but it seems important to mention that there are good non-dunder ways to access the data.

* Correct how-does-it-work.rst change to use semantic newlines

* it's attr not attrs...

* Simplify attr.fields link
2020-01-03 15:37:39 +01:00
Julian Berman 8824dc26c2 Add default_role for Sphinx. (#571)
* Add default_role for Sphinx.

Fix a bunch of broken refs along the way, which become
errors now via -W if you have default_role set.

In theory you can catch those via sphinx-build -n (i.e.
nitpick mode), which IMHO is a decent idea anyhow, but it's
a longer diff to enable that because it'd involve fixing a
bunch of the places that try to reference types that don't
exist (e.g. :type foo: Any value). But obviously can be done.

Also didn't actually use this anywhere yet (the any role),
but will do so in a follow-up if this is acceptable.

* Remove the roles from builtin objects to demo any.

* Style.

* Add z.i to intersphinx.

Enables the link to z.i.Interface.

* Enable nitpick mode.

Fix the remaining broken links or whitelist them via nitpick_ignore.

* Kill all :func:s.

* Kill all :class:es.

* Kill all :doc:s.

* Kill all :ref:s.

Except one, that probably meant :func:, and which
is a duplicate ref.

* Kill :exc: and :data:.

* Kill :mod:s.

* Kill new explicit refs from the merge.
2019-09-09 15:02:16 +02:00
Hynek Schlawack 1fada3d374 Be consistent in calling slotted classes slotted 2019-02-25 16:09:57 +01:00
jimbo1qaz deb90f9b6f Fix grammar error in docs (#477)
"You should avoid $foo, in order to instantiate frozen slotted classes..."
2018-12-24 07:07:00 +01:00
Hynek Schlawack 73ae718ec5
Consistently use "base class" and "subclass" (#436)
Thanks to ABCs, "base class" is more Python than "superclass" and the latter is
also slightly confusing by alluding to "super" and/or being judgy.
2018-08-29 18:52:47 +02:00
Kyle Altendorf 35a3f28400 Slight tidy in how immutability works docs (#419) 2018-08-02 13:37:23 +02:00
Hynek Schlawack db7c37eda8
Add glossary & make slotted classes official (#371)
* Add glossary & make slotted classes official

* Add missing import
2018-05-02 07:24:04 +02:00
Hynek Schlawack 13fd7403cb Update How Does It Work 2018-01-29 08:03:31 +01:00
Hynek Schlawack 3040bdabbc Refactor class creation (#272)
Instead of adding and possibly later deleting attributes, the class creation is delegated into a cleaner building pattern.
2017-10-26 12:55:34 +02:00
Hynek Schlawack c637f5b4f8 Wordsmith how does it work 2017-08-18 17:19:11 +02:00
rtoijala 10368b4232 Some more typos (#219)
I went with the American spelling of "fulfill" instead of the British
"fulfil".
2017-07-20 17:30:20 +02:00
Rich Wareham 49e847052e docs: "less [...] calls" -> "fewer [...] calls" (#122)
Since function calls are discrete one has "fewer" of them.
2016-12-08 17:01:39 +01:00
Hynek Schlawack ce0f82aa8b Document immutability better 2016-08-27 09:27:16 +02:00
Hynek Schlawack b040503663 More documentation polish 2016-08-15 17:26:49 +02:00
Hynek Schlawack 395aa07820 Documentation overhaul 2016-08-15 13:59:04 +02:00