From e77dbb9055a6c2c1f9ff48b0e7055cfed9ae70ef Mon Sep 17 00:00:00 2001 From: Jarrod Millman Date: Wed, 1 Feb 2023 11:31:19 -0800 Subject: Update pre-commit (#449) * Update pre-commit * Run pre-commit on all files --- .pre-commit-config.yaml | 8 ++++---- numpydoc/docscrape.py | 3 +-- numpydoc/tests/test_docscrape.py | 1 - numpydoc/tests/test_validate.py | 1 - requirements/developer.txt | 2 +- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 611379e..900c354 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -17,7 +17,7 @@ repos: - id: check-added-large-files - repo: https://github.com/psf/black - rev: 22.8.0 + rev: 23.1.0 hooks: - id: black @@ -29,12 +29,12 @@ repos: args: [--prose-wrap=preserve] - repo: https://github.com/asottile/blacken-docs - rev: v1.12.1 + rev: 1.13.0 hooks: - id: blacken-docs - repo: https://github.com/asottile/pyupgrade - rev: v2.38.2 + rev: v3.3.1 hooks: - id: pyupgrade args: [--py37-plus] diff --git a/numpydoc/docscrape.py b/numpydoc/docscrape.py index e5c07f5..150325f 100644 --- a/numpydoc/docscrape.py +++ b/numpydoc/docscrape.py @@ -408,7 +408,7 @@ class NumpyDocString(Mapping): msg = "Docstring contains a Receives section but not Yields." raise ValueError(msg) - for (section, content) in sections: + for section, content in sections: if not section.startswith(".."): section = (s.capitalize() for s in section.split(" ")) section = " ".join(section) @@ -631,7 +631,6 @@ class ObjDoc(NumpyDocString): class ClassDoc(NumpyDocString): - extra_public_methods = ["__call__"] def __init__(self, cls, doc=None, modulename="", func_doc=FunctionDoc, config=None): diff --git a/numpydoc/tests/test_docscrape.py b/numpydoc/tests/test_docscrape.py index 227f872..73dea61 100644 --- a/numpydoc/tests/test_docscrape.py +++ b/numpydoc/tests/test_docscrape.py @@ -1443,7 +1443,6 @@ def test_nonstandard_property(): obj._set_axis(self.axis, value) class Dummy: - attr = SpecialProperty(doc="test attribute") doc = get_doc_object(Dummy) diff --git a/numpydoc/tests/test_validate.py b/numpydoc/tests/test_validate.py index 87daee1..f01cde5 100644 --- a/numpydoc/tests/test_validate.py +++ b/numpydoc/tests/test_validate.py @@ -545,7 +545,6 @@ class BadGenericDocStrings: """Everything here has a bad docstring""" def func(self): - """Some function. With several mistakes in the docstring. diff --git a/requirements/developer.txt b/requirements/developer.txt index db79816..b8de207 100644 --- a/requirements/developer.txt +++ b/requirements/developer.txt @@ -1 +1 @@ -pre-commit>=2.20 +pre-commit>=3.0 -- cgit v1.2.1