diff options
author | Jarrod Millman <jarrod.millman@gmail.com> | 2023-02-01 11:31:19 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-01 11:31:19 -0800 |
commit | e77dbb9055a6c2c1f9ff48b0e7055cfed9ae70ef (patch) | |
tree | 3a2cff68c3b772eb93166dd1375b179ba642af62 | |
parent | fe95e8b9332ed4ebc154db08b00232f5f67f9330 (diff) | |
download | numpydoc-e77dbb9055a6c2c1f9ff48b0e7055cfed9ae70ef.tar.gz |
Update pre-commit (#449)
* Update pre-commit
* Run pre-commit on all files
-rw-r--r-- | .pre-commit-config.yaml | 8 | ||||
-rw-r--r-- | numpydoc/docscrape.py | 3 | ||||
-rw-r--r-- | numpydoc/tests/test_docscrape.py | 1 | ||||
-rw-r--r-- | numpydoc/tests/test_validate.py | 1 | ||||
-rw-r--r-- | 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 |