diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f8730563d..ec1773c4f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,12 +4,12 @@ ci: repos: - repo: https://github.com/psf/black - rev: 23.10.1 + rev: 23.11.0 hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.4 + rev: v0.1.6 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/README.md b/README.md index 77d8974b5..01453276e 100644 --- a/README.md +++ b/README.md @@ -46,10 +46,6 @@ Especially those generously supporting us at the *The Organization* tier and hig - - - - diff --git a/docs/_static/custom.css b/docs/_static/custom.css new file mode 100644 index 000000000..72083fee4 --- /dev/null +++ b/docs/_static/custom.css @@ -0,0 +1,10 @@ +@import url('https://rsms.me/inter/inter.css'); +@import url('https://assets.hynek.me/css/bm.css'); + + +:root { + font-feature-settings: 'liga' 1, 'calt' 1; /* fix for Chrome */ +} +@supports (font-variation-settings: normal) { + :root { font-family: InterVariable, sans-serif; } +} diff --git a/docs/conf.py b/docs/conf.py index d93a70dcc..b92354a6f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -98,7 +98,13 @@ "light_logo": "attrs_logo.svg", "dark_logo": "attrs_logo_white.svg", "top_of_page_button": None, + "light_css_variables": { + "font-stack": "Inter,sans-serif", + "font-stack--monospace": "BerkeleyMono, MonoLisa, ui-monospace, " + "SFMono-Regular, Menlo, Consolas, Liberation Mono, monospace", + }, } +html_css_files = ["custom.css"] # The name of an image file (within the static path) to use as favicon of the diff --git a/docs/why.md b/docs/why.md index 34be3029a..eeba9db58 100644 --- a/docs/why.md +++ b/docs/why.md @@ -109,7 +109,7 @@ Other often surprising behaviors include: you end up with a class that has *two* `Point`s in its {attr}`__mro__ `: `[, , , ]`. That's not only confusing, it also has very practical consequences: - for example if you create documentation that includes class hierarchies like *[*Sphinx*'s autodoc](https://www.sphinx-doc.org/en/stable/usage/extensions/autodoc.html) with `show-inheritance`. + for example if you create documentation that includes class hierarchies like [*Sphinx*'s autodoc](https://www.sphinx-doc.org/en/stable/usage/extensions/autodoc.html) with `show-inheritance`. Again: common problem, hacky solution with confusing fallout. All these things make `namedtuple`s a particularly poor choice for public APIs because all your objects are irrevocably tainted.