mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Deactivate (provisorily) Python12-dev testing (#11035)
* fix flake8 warnings * Deactivate (provisorily) testing with 3.12-dev (refs: https://github.com/sphinx-doc/sphinx/pull/10995#issuecomment-1330310586 ) * Escape # in tox.ini for tox 4 compatibility ('du-latest' tests) Co-authored-by: Daniel Eades <danieleades@hotmail.com>
This commit is contained in:
parent
d8977d3e57
commit
7418d2ccc4
1
.github/workflows/main.yml
vendored
1
.github/workflows/main.yml
vendored
@ -21,7 +21,6 @@ jobs:
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
- "3.12-dev"
|
||||
docutils:
|
||||
- "du18"
|
||||
- "du19"
|
||||
|
9
.pre-commit-config.yaml
Normal file
9
.pre-commit-config.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
repos:
|
||||
- repo: https://github.com/asottile/yesqa
|
||||
rev: v1.4.0
|
||||
hooks:
|
||||
- id: yesqa
|
||||
additional_dependencies:
|
||||
- flake8-comprehensions
|
||||
- flake8-bugbear
|
||||
- flake8-simplify
|
@ -153,8 +153,8 @@ def augment_descriptions_with_types(
|
||||
force_rtype: bool
|
||||
) -> None:
|
||||
fields = cast(Iterable[nodes.field], node)
|
||||
has_description = set() # type: Set[str]
|
||||
has_type = set() # type: Set[str]
|
||||
has_description: Set[str] = set()
|
||||
has_type: Set[str] = set()
|
||||
for field in fields:
|
||||
field_name = field[0].astext()
|
||||
parts = re.split(' +', field_name)
|
||||
|
@ -5,7 +5,7 @@ The todolist directive collects all todos of your project and lists them along
|
||||
with a backlink to the original location.
|
||||
"""
|
||||
|
||||
from typing import Any, Dict, List, Tuple, cast
|
||||
from typing import Any, Dict, List, cast
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.nodes import Element, Node
|
||||
@ -55,7 +55,7 @@ class Todo(BaseAdmonition, SphinxDirective):
|
||||
if not self.options.get('class'):
|
||||
self.options['class'] = ['admonition-todo']
|
||||
|
||||
(todo,) = super().run() # type: Tuple[Node]
|
||||
(todo,) = super().run()
|
||||
if isinstance(todo, nodes.system_message):
|
||||
return [todo]
|
||||
elif isinstance(todo, todo_node):
|
||||
|
@ -5,7 +5,8 @@ import unicodedata
|
||||
from typing import TYPE_CHECKING, Any, Dict, Generator, List, Optional, Tuple, cast
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.nodes import Element, Node, Text
|
||||
from docutils.nodes import Element # noqa: F401 (used for type comments only)
|
||||
from docutils.nodes import Node, Text
|
||||
from docutils.transforms import Transform, Transformer
|
||||
from docutils.transforms.parts import ContentsFilter
|
||||
from docutils.transforms.universal import SmartQuotes
|
||||
|
@ -3,7 +3,8 @@
|
||||
from typing import Any, Dict, Iterable, cast
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.nodes import Element, TextElement
|
||||
from docutils.nodes import TextElement # noqa: F401 (used for type comments only)
|
||||
from docutils.nodes import Element
|
||||
from docutils.writers.manpage import Translator as BaseTranslator
|
||||
from docutils.writers.manpage import Writer
|
||||
|
||||
|
@ -557,7 +557,7 @@ def test_too_many_requests_user_timeout(app, capsys):
|
||||
|
||||
|
||||
class FakeResponse:
|
||||
headers = {} # type: Dict[str, str]
|
||||
headers: Dict[str, str] = {}
|
||||
url = "http://localhost/"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user