Skip to content

Commit

Permalink
Merge branch 'master' into literallyinclude-options
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner authored Aug 17, 2024
2 parents 90a05d2 + 334e69f commit afe4b88
Show file tree
Hide file tree
Showing 22 changed files with 1,090 additions and 198 deletions.
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ exclude =
doc/usage/extensions/example*.py,
per-file-ignores =
doc/conf.py:W605
sphinx/events.py:E704,
tests/test_extensions/ext_napoleon_pep526_data_google.py:MLL001,
tests/test_extensions/ext_napoleon_pep526_data_numpy.py:MLL001,
9 changes: 7 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,17 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Get Ruff version from pyproject.toml
run: |
RUFF_VERSION=$(awk -F'[="]' '/\[project\.optional-dependencies\]/ {p=1} /ruff/ {if (p) print $4}' pyproject.toml)
echo "RUFF_VERSION=$RUFF_VERSION" >> $GITHUB_ENV
- name: Install Ruff
run: >
RUFF_VERSION=$(awk -F'[="]' '/\[project\.optional-dependencies\]/ {p=1} /ruff/ {if (p) print $4}' pyproject.toml)
curl --no-progress-meter --location --fail
--proto '=https' --tlsv1.2
"https://astral.sh/ruff/${RUFF_VERSION}/install.sh"
--write-out "%{stderr}Downloaded: %{url}\n"
"https://astral.sh/ruff/$RUFF_VERSION/install.sh"
| sh
- name: Lint with Ruff
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
FORCE_COLOR: "1"

jobs:
build:
runs-on: ubuntu-latest
env:
node-version: "16"
node-version: "20"

steps:
- uses: actions/checkout@v4
Expand All @@ -37,5 +40,4 @@ jobs:
node-version: ${{ env.node-version }}
cache: "npm"
- run: npm install
- name: Run headless test
run: xvfb-run -a npm test
- run: npm test
6 changes: 6 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,19 +186,24 @@
('js:func', 'number'),
('js:func', 'string'),
('py:attr', 'srcline'),
('py:class', '_ConfigRebuild'), # sphinx.application.Sphinx.add_config_value
('py:class', '_StrPath'), # sphinx.environment.BuildEnvironment.doc2path
('py:class', 'Element'), # sphinx.domains.Domain
('py:class', 'Documenter'), # sphinx.application.Sphinx.add_autodocumenter
('py:class', 'IndexEntry'), # sphinx.domains.IndexEntry
('py:class', 'Lexer'), # sphinx.application.Sphinx.add_lexer
('py:class', 'Node'), # sphinx.domains.Domain
('py:class', 'NullTranslations'), # gettext.NullTranslations
('py:class', 'Path'), # sphinx.application.Sphinx.connect
('py:class', 'RoleFunction'), # sphinx.domains.Domain
('py:class', 'RSTState'), # sphinx.utils.parsing.nested_parse_to_nodes
('py:class', 'Theme'), # sphinx.application.TemplateBridge
('py:class', 'SearchLanguage'), # sphinx.application.Sphinx.add_search_language
('py:class', 'StringList'), # sphinx.utils.parsing.nested_parse_to_nodes
('py:class', 'system_message'), # sphinx.utils.docutils.SphinxDirective
('py:class', 'TitleGetter'), # sphinx.domains.Domain
('py:class', 'todo_node'), # sphinx.application.Sphinx.connect
('py:class', 'Transform'), # sphinx.application.Sphinx.add_transform
('py:class', 'XRefRole'), # sphinx.domains.Domain
('py:class', 'docutils.nodes.Element'),
('py:class', 'docutils.nodes.Node'),
Expand All @@ -210,6 +215,7 @@
('py:class', 'docutils.parsers.rst.states.Inliner'),
('py:class', 'docutils.transforms.Transform'),
('py:class', 'nodes.NodeVisitor'),
('py:class', 'nodes.TextElement'), # sphinx.application.Sphinx.connect
('py:class', 'nodes.document'),
('py:class', 'nodes.reference'),
('py:class', 'pygments.lexer.Lexer'),
Expand Down
8 changes: 4 additions & 4 deletions doc/extdev/event_callbacks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ Here is a more detailed list of these events.

:param app: :class:`.Sphinx`
:param env: :class:`.BuildEnvironment`
:param added: ``set[str]``
:param changed: ``set[str]``
:param removed: ``set[str]``
:returns: ``list[str]`` of additional docnames to re-read
:param added: ``Set[str]``
:param changed: ``Set[str]``
:param removed: ``Set[str]``
:returns: ``Sequence[str]`` of additional docnames to re-read

Emitted when the environment determines which source files have changed and
should be re-read.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ docs = [
]
lint = [
"flake8>=6.0",
"ruff==0.5.7",
"ruff==0.6.1",
"mypy==1.11.1",
"sphinx-lint>=0.9",
"types-colorama==0.4.15.20240311",
Expand Down
Loading

0 comments on commit afe4b88

Please sign in to comment.