Skip to content

Commit

Permalink
Bump tools and deps
Browse files Browse the repository at this point in the history
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
  • Loading branch information
gaborbernat committed Jan 16, 2023
1 parent eda25f6 commit 7cfb915
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 43 deletions.
28 changes: 14 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-ast
- id: check-builtin-literals
Expand All @@ -12,7 +12,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.2.2
rev: v3.3.1
hooks:
- id: pyupgrade
args: ["--py37-plus"]
Expand All @@ -21,50 +21,50 @@ repos:
files: "^(tests/roots/test-dummy/dummy_module.py)$"
args: ["--py36-plus"]
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
rev: 5.11.4
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 22.12.0
hooks:
- id: black
args: [--safe]
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
rev: 1.13.0
hooks:
- id: blacken-docs
additional_dependencies: [black==22.10]
additional_dependencies: [black==22.12]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
rev: v1.10.0
hooks:
- id: rst-backticks
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "0.5.2"
rev: "0.6.1"
hooks:
- id: tox-ini-fmt
args: ["-p", "fix"]
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear==22.10.27
- flake8-bugbear==23.1.14
- flake8-comprehensions==3.10.1
- flake8-pytest-style==1.6
- flake8-spellcheck==0.28
- flake8-unused-arguments==0.0.12
- flake8-noqa==1.2.9
- pep8-naming==0.13.2
- flake8-noqa==1.3
- pep8-naming==0.13.3
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.0-alpha.4"
rev: "v2.7.1"
hooks:
- id: prettier
additional_dependencies:
- prettier@2.7.1
- "@prettier/plugin-xml@2.2"
args: ["--print-width=120", "--prose-wrap=always"]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.32.2
rev: v0.33.0
hooks:
- id: markdownlint
- repo: meta
Expand Down
16 changes: 8 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling>=1.11.1", "hatch-vcs>=0.2"]
requires = ["hatchling>=1.12.2", "hatch-vcs>=0.3"]

[project]
name = "sphinx_autodoc_typehints"
Expand All @@ -17,15 +17,15 @@ authors = [{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" }]
maintainers = [{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" }]
requires-python = ">=3.7"
dependencies = ["Sphinx>=5.3"]
optional-dependencies.docs = ["furo>=2022.9.29", "sphinx>=5.3", "sphinx-autodoc-typehints>=1.19.4"]
optional-dependencies.docs = ["furo>=2022.12.7", "sphinx>=6.1.3", "sphinx-autodoc-typehints>=1.21"]
optional-dependencies.testing = [
"covdefaults>=2.2",
"coverage>=6.5",
"diff-cover>=7.0.1",
"nptyping>=2.3.1",
"pytest>=7.2",
"covdefaults>=2.2.2",
"coverage>=7.0.5",
"diff-cover>=7.3",
"nptyping>=2.4.1",
"pytest>=7.2.1",
"pytest-cov>=4",
"sphobjinv>=2.2.2",
"sphobjinv>=2.3.1",
"typing-extensions>=4.4",
]
optional-dependencies.type-comment = ['typed-ast>=1.5.4; python_version < "3.8"']
Expand Down
14 changes: 7 additions & 7 deletions tests/roots/test-dummy/dummy_module.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import typing
from dataclasses import dataclass
from mailbox import Mailbox
from typing import Callable, Optional, Union
from typing import Union # noqa: F401 # needed for expansion of Optional
from typing import Callable, Optional


def get_local_function():
Expand All @@ -22,10 +22,10 @@ class Class:
:param z: baz
"""

def __init__(self, x: bool, y: int, z: typing.Optional[str] = None) -> None: # noqa: U100
def __init__(self, x: bool, y: int, z: Optional[str] = None) -> None: # noqa: U100
pass

def a_method(self, x: bool, y: int, z: typing.Optional[str] = None) -> str: # noqa: U100
def a_method(self, x: bool, y: int, z: Optional[str] = None) -> str: # noqa: U100
"""
Method docstring.
Expand Down Expand Up @@ -56,7 +56,7 @@ def __magic_custom_method__(self, x: str) -> str: # noqa: U100
"""

@classmethod
def a_classmethod(cls, x: bool, y: int, z: typing.Optional[str] = None) -> str: # noqa: U100
def a_classmethod(cls, x: bool, y: int, z: Optional[str] = None) -> str: # noqa: U100
"""
Classmethod docstring.
Expand All @@ -66,7 +66,7 @@ def a_classmethod(cls, x: bool, y: int, z: typing.Optional[str] = None) -> str:
"""

@staticmethod
def a_staticmethod(x: bool, y: int, z: typing.Optional[str] = None) -> str: # noqa: U100
def a_staticmethod(x: bool, y: int, z: Optional[str] = None) -> str: # noqa: U100
"""
Staticmethod docstring.
Expand Down Expand Up @@ -114,7 +114,7 @@ def __init__(self, message: str) -> None:
super().__init__(message)


def function(x: bool, y: int, z_: typing.Optional[str] = None) -> str: # noqa: U100
def function(x: bool, y: int, z_: Optional[str] = None) -> str: # noqa: U100
"""
Function docstring.
Expand Down
14 changes: 7 additions & 7 deletions tests/test_sphinx_autodoc_typehints.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@

# Mypy does not support recursive type aliases, but
# other type checkers do.
RecList = Union[int, List["RecList"]] # type: ignore
MutualRecA = Union[bool, List["MutualRecB"]] # type: ignore
MutualRecB = Union[str, List["MutualRecA"]] # type: ignore
RecList = Union[int, List["RecList"]]
MutualRecA = Union[bool, List["MutualRecB"]]
MutualRecB = Union[str, List["MutualRecA"]]


class A:
Expand Down Expand Up @@ -103,10 +103,10 @@ class Metaclass(type):

class HintedMethods:
@classmethod
def from_magic(cls: type[T]) -> T:
def from_magic(cls: type[T]) -> T: # type: ignore
...

def method(self: T) -> T:
def method(self: T) -> T: # type: ignore
...


Expand Down Expand Up @@ -151,7 +151,7 @@ def __getitem__(self, params):
pytest.param(Callable[..., str], "typing", "Callable", (..., str), id="Callable_returntype"),
pytest.param(Callable[[int, str], str], "typing", "Callable", (int, str, str), id="Callable_all_types"),
pytest.param(
AbcCallable[[int, str], str], # type: ignore[misc]
AbcCallable[[int, str], str], # type: ignore
"collections.abc",
"Callable",
(int, str, str),
Expand Down Expand Up @@ -258,7 +258,7 @@ def test_parse_annotation(annotation: Any, module: str, class_name: str, args: t
" :py:class:`~typing.TypeVar`\\(``T``)]",
),
(
AbcCallable[[int, str], bool], # type: ignore[misc]
AbcCallable[[int, str], bool], # type: ignore
":py:class:`~collections.abc.Callable`\\[\\[:py:class:`int`, " ":py:class:`str`], :py:class:`bool`]",
),
(Pattern, ":py:class:`~typing.Pattern`"),
Expand Down
14 changes: 7 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ wheel_build_env = .pkg
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
skip_install = true
deps =
pre-commit>=2.20
pre-commit>=2.21
commands =
pre-commit run --all-files --show-diff-on-failure

Expand All @@ -46,7 +46,7 @@ description = run type check on code base
setenv =
{tty:MYPY_FORCE_COLOR = 1}
deps =
mypy==0.982
mypy==0.991
types-docutils>=0.19.1.1
commands =
mypy --python-version 3.10 src
Expand All @@ -60,9 +60,9 @@ setenv =
COVERAGE_FILE = {toxworkdir}/.coverage
skip_install = true
deps =
covdefaults>=2.2
coverage>=6.5
diff-cover>=7.0.1
covdefaults>=2.2.2
coverage>=7.0.5
diff-cover>=7.3
extras =
parallel_show_output = true
commands =
Expand All @@ -82,8 +82,8 @@ depends =
description = check that the long description is valid (need for PyPI)
skip_install = true
deps =
build[virtualenv]>=0.9
twine>=4.0.1
build[virtualenv]>=0.10
twine>=4.0.2
extras =
commands =
pyproject-build -o {envtmpdir} --wheel --sdist .
Expand Down

0 comments on commit 7cfb915

Please sign in to comment.