Skip to content

Commit 2ccff05

Browse files
authored
Merge branch 'main' into experiments/warn-no-docstring
2 parents 8f8641c + b6813ed commit 2ccff05

File tree

11 files changed

+160
-127
lines changed

11 files changed

+160
-127
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repos:
2424
hooks:
2525
- id: black
2626
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: v0.9.9
27+
rev: v0.11.0
2828
hooks:
2929
- id: ruff
3030
types: [file]
@@ -38,15 +38,15 @@ repos:
3838
# tomli needed on 3.10. tomllib is available in stdlib on 3.11+
3939
- tomli
4040
- repo: https://github.com/crate-ci/typos
41-
rev: v1.30.0
41+
rev: v1.30.2
4242
hooks:
4343
- id: typos
4444
- repo: https://github.com/sphinx-contrib/sphinx-lint
4545
rev: v1.0.0
4646
hooks:
4747
- id: sphinx-lint
4848
- repo: https://github.com/woodruffw/zizmor-pre-commit
49-
rev: v1.4.1
49+
rev: v1.5.1
5050
hooks:
5151
- id: zizmor
5252
- repo: local
@@ -59,7 +59,7 @@ repos:
5959
additional_dependencies: ["astor", "attrs", "black", "ruff"]
6060
files: ^src\/trio\/_core\/(_run|(_i(o_(common|epoll|kqueue|windows)|nstrumentation)))\.py$
6161
- repo: https://github.com/astral-sh/uv-pre-commit
62-
rev: 0.6.3
62+
rev: 0.6.6
6363
hooks:
6464
# Compile requirements
6565
- id: pip-compile

docs/source/_static/hackrtd.css renamed to docs/source/_static/styles.css

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
/* Temporary hack to work around bug in rtd theme 2.0 through 2.4
2-
See https://github.com/rtfd/sphinx_rtd_theme/pull/382
3-
*/
4-
pre {
5-
line-height: normal !important;
6-
}
7-
81
/* Make .. deprecation:: blocks visible
92
* (by default they're entirely unstyled)
103
*/
@@ -23,6 +16,10 @@ pre {
2316
* thingummy also has an <hr> in it, and putting the ornament on that looks
2417
* *really weird*. (In particular, the background color is wrong.)
2518
*/
19+
.rst-content hr {
20+
overflow: visible;
21+
}
22+
2623
.rst-content hr:after {
2724
/* This .svg gets displayed on top of the middle of the hrule. It has a box
2825
* behind the logo that's colored to match the RTD theme body background
@@ -41,39 +38,21 @@ pre {
4138

4239
/* Hacks to make the upper-left logo area look nicer */
4340

44-
.wy-side-nav-search {
45-
/* Lighter background color to match logo */
46-
background-color: #d2e7fa !important;
47-
}
48-
4941
.wy-side-nav-search > a {
5042
color: #306998 !important;
5143
}
5244

53-
.wy-side-nav-search > a.logo {
54-
display: block !important;
55-
padding-bottom: 0.809em !important;
45+
/* vertically center version text */
46+
.wy-side-nav-search > a {
47+
display: flex;
48+
align-items: center;
49+
margin: auto;
50+
width: max-content;
5651
}
5752

5853
.wy-side-nav-search > a img.logo {
59-
display: inline !important;
60-
padding: 0 !important;
61-
}
62-
63-
.trio-version {
64-
display: inline;
65-
/* I *cannot* figure out how to get the version text vertically centered
66-
on the logo. Oh well...
67-
height: 32px;
68-
line-height: 32px;
69-
*/
70-
}
71-
72-
.wy-side-nav-search > a {
73-
/* Mostly this is just to simplify things, so we don't have margin/padding
74-
* on both the <a> and the <img> inside it */
75-
margin: 0 !important;
76-
padding: 0 !important;
54+
margin-left: 0;
55+
margin-right: 5px;
7756
}
7857

7958
/* Get rid of the weird super dark "Contents" label that wastes vertical space

docs/source/_templates/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<a class="logo" href="{{ pathto(root_doc) }}">
1313
<img class="logo" src="{{ logo_url }}" />
1414
{%- set nav_version = version %}
15-
{% if READTHEDOCS and current_version %}
15+
{% if current_version %}
1616
{%- set nav_version = current_version %}
1717
{% endif %}
1818
{# don't show the version on RTD if it's the default #}

docs/source/conf.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,9 @@ def autodoc_process_docstring(
204204
logger.warning("outdated list of undocumented things")
205205

206206

207-
# XX hack the RTD theme until
208-
# https://github.com/rtfd/sphinx_rtd_theme/pull/382
209-
# is shipped (should be in the release after 0.2.4)
210-
# ...note that this has since grown to contain a bunch of other CSS hacks too
211-
# though.
212207
def setup(app: Sphinx) -> None:
213-
app.add_css_file("hackrtd.css")
208+
# Add our custom styling to make our documentation better!
209+
app.add_css_file("styles.css")
214210
app.connect("autodoc-process-signature", autodoc_process_signature)
215211
app.connect("autodoc-process-docstring", autodoc_process_docstring)
216212

@@ -219,12 +215,7 @@ def setup(app: Sphinx) -> None:
219215
app.connect("source-read", on_read_source)
220216

221217

222-
# Our docs use the READTHEDOCS variable, so copied from:
223-
# https://about.readthedocs.com/blog/2024/07/addons-by-default/
224-
if os.environ.get("READTHEDOCS", "") == "True":
225-
if "html_context" not in globals():
226-
html_context = {}
227-
html_context["READTHEDOCS"] = True
218+
html_context = {"current_version": os.environ.get("READTHEDOCS_VERSION_NAME")}
228219

229220
# -- General configuration ------------------------------------------------
230221

@@ -414,6 +405,7 @@ def add_mapping(
414405
"navigation_depth": 4,
415406
"logo_only": True,
416407
"prev_next_buttons_location": "both",
408+
"style_nav_header_background": "#d2e7fa",
417409
}
418410

419411
# Add any paths that contain custom static files (such as style sheets) here,

newsfragments/3183.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update type hints for `trio.run_process` and `trio.lowlevel.open_process`.

newsfragments/3224.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix incorrect return type hint for :meth:`Nursery.start() <trio.Nursery.start>`.

src/trio/_core/_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ async def start( # type: ignore[explicit-any]
13071307
async_fn: Callable[..., Awaitable[object]],
13081308
*args: object,
13091309
name: object = None,
1310-
) -> Any | None:
1310+
) -> Any:
13111311
r"""Creates and initializes a child task.
13121312
13131313
Like :meth:`start_soon`, but blocks until the new task has

0 commit comments

Comments
 (0)