Skip to content

Commit 97f7aaa

Browse files
committed
Merge branch 'bump-types-docutils' into dependabot/pip/types-docutils-0.21.0.20250516
2 parents bd5a300 + a1ee29d commit 97f7aaa

20 files changed

+433
-283
lines changed

.github/workflows/lint.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,21 @@ jobs:
123123
run: |
124124
python -m build .
125125
twine check dist/*
126+
127+
prettier:
128+
runs-on: ubuntu-latest
129+
130+
steps:
131+
- uses: actions/checkout@v4
132+
- name: Set up Node.js
133+
uses: actions/setup-node@v4
134+
with:
135+
node-version: "20"
136+
cache: "npm"
137+
- run: >
138+
npx prettier@3.5
139+
--check
140+
"sphinx/themes/**/*.js"
141+
"!sphinx/themes/bizstyle/static/css3-mediaqueries*.js"
142+
"tests/js/**/*.{js,mjs}"
143+
"!tests/js/fixtures/**"

.prettierrc.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# https://prettier.io/docs/options
2+
experimentalOperatorPosition = "start"

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ docs = [
9292
"sphinxcontrib-websupport",
9393
]
9494
lint = [
95-
"ruff==0.11.10",
95+
"ruff==0.11.11",
9696
"mypy==1.15.0",
9797
"sphinx-lint>=0.9",
9898
"types-colorama==0.4.15.20240311",
9999
"types-defusedxml==0.7.0.20250516",
100-
"types-docutils==0.21.0.20250523",
100+
"types-docutils==0.21.0.20250525",
101101
"types-Pillow==10.2.0.20240822",
102102
"types-Pygments==2.19.0.20250516",
103103
"types-requests==2.32.0.20250515", # align with requests
@@ -135,7 +135,7 @@ docs = [
135135
"sphinxcontrib-websupport",
136136
]
137137
lint = [
138-
"ruff==0.11.10",
138+
"ruff==0.11.11",
139139
"sphinx-lint>=0.9",
140140
]
141141
package = [
@@ -158,14 +158,15 @@ translations = [
158158
]
159159
types = [
160160
"mypy==1.15.0",
161+
"pyrefly",
161162
"pyright==1.1.400",
162163
{ include-group = "type-stubs" },
163164
]
164165
type-stubs = [
165166
# align with versions used elsewhere
166167
"types-colorama==0.4.15.20240311",
167168
"types-defusedxml==0.7.0.20250516",
168-
"types-docutils==0.21.0.20250523",
169+
"types-docutils==0.21.0.20250525",
169170
"types-Pillow==10.2.0.20240822",
170171
"types-Pygments==2.19.0.20250516",
171172
"types-requests==2.32.0.20250515",

pyrefly.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Configuration file for Pyrefly_.
2+
# n.b. Pyrefly is early in development.
3+
# Sphinx's current primary/reference type-checker is mypy.
4+
#
5+
# .. _Pyrefly: https://pyrefly.org/en/docs/configuration/
6+
7+
project_includes = [
8+
"doc/conf.py",
9+
"doc/development/tutorials/examples/autodoc_intenum.py",
10+
"doc/development/tutorials/examples/helloworld.py",
11+
"sphinx",
12+
"tests",
13+
"utils",
14+
]
15+
project_excludes = [
16+
"**/tests/roots*",
17+
]
18+
python_version = "3.11"
19+
replace_imports_with_any = [
20+
"imagesize",
21+
"pyximport",
22+
"snowballstemmer",
23+
]
24+
25+
# https://pyrefly.org/en/docs/error-kinds/
26+
[errors]
27+
implicitly-defined-attribute = false # many false positives

sphinx/builders/_epub_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ class NavPoint(NamedTuple):
114114

115115
def sphinx_smarty_pants(t: str, language: str = 'en') -> str:
116116
t = t.replace('"', '"')
117-
t = smartquotes.educateDashesOldSchool(t) # type: ignore[no-untyped-call]
118-
t = smartquotes.educateQuotes(t, language) # type: ignore[no-untyped-call]
117+
t = smartquotes.educateDashesOldSchool(t)
118+
t = smartquotes.educateQuotes(t, language)
119119
t = t.replace('"', '"')
120120
return t
121121

sphinx/search/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ class SearchLanguage:
8181
/**
8282
* Dummy stemmer for languages without stemming rules.
8383
*/
84-
var Stemmer = function() {
85-
this.stemWord = function(w) {
84+
var Stemmer = function () {
85+
this.stemWord = function (w) {
8686
return w;
87-
}
88-
}
87+
};
88+
};
8989
"""
9090

9191
_word_re = re.compile(r'\w+')

sphinx/themes/basic/static/doctools.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const Documentation = {
5959
Object.assign(Documentation.TRANSLATIONS, catalog.messages);
6060
Documentation.PLURAL_EXPR = new Function(
6161
"n",
62-
`return (${catalog.plural_expr})`
62+
`return (${catalog.plural_expr})`,
6363
);
6464
Documentation.LOCALE = catalog.locale;
6565
},
@@ -89,7 +89,7 @@ const Documentation = {
8989

9090
const togglerElements = document.querySelectorAll("img.toggler");
9191
togglerElements.forEach((el) =>
92-
el.addEventListener("click", (event) => toggler(event.currentTarget))
92+
el.addEventListener("click", (event) => toggler(event.currentTarget)),
9393
);
9494
togglerElements.forEach((el) => (el.style.display = ""));
9595
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
@@ -98,14 +98,15 @@ const Documentation = {
9898
initOnKeyListeners: () => {
9999
// only install a listener if it is really needed
100100
if (
101-
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
102-
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
101+
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS
102+
&& !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
103103
)
104104
return;
105105

106106
document.addEventListener("keydown", (event) => {
107107
// bail for input elements
108-
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
108+
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName))
109+
return;
109110
// bail with special keys
110111
if (event.altKey || event.ctrlKey || event.metaKey) return;
111112

0 commit comments

Comments
 (0)