Skip to content

Commit

Permalink
Update pre-commit (#449)
Browse files Browse the repository at this point in the history
* Update pre-commit

* Run pre-commit on all files
  • Loading branch information
jarrodmillman committed Feb 1, 2023
1 parent fe95e8b commit e77dbb9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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]
3 changes: 1 addition & 2 deletions numpydoc/docscrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def _parse(self):
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)
Expand Down Expand Up @@ -631,7 +631,6 @@ def __init__(self, obj, doc=None, config=None):


class ClassDoc(NumpyDocString):

extra_public_methods = ["__call__"]

def __init__(self, cls, doc=None, modulename="", func_doc=FunctionDoc, config=None):
Expand Down
1 change: 0 additions & 1 deletion numpydoc/tests/test_docscrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,6 @@ def __set__(self, obj, value):
obj._set_axis(self.axis, value)

class Dummy:

attr = SpecialProperty(doc="test attribute")

doc = get_doc_object(Dummy)
Expand Down
1 change: 0 additions & 1 deletion numpydoc/tests/test_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,6 @@ class BadGenericDocStrings:
"""Everything here has a bad docstring"""

def func(self):

"""Some function.
With several mistakes in the docstring.
Expand Down
2 changes: 1 addition & 1 deletion requirements/developer.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pre-commit>=2.20
pre-commit>=3.0

0 comments on commit e77dbb9

Please sign in to comment.