From 7b2eb7aa99b3421c291dcb148d6b477f8ca633e8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 17:18:34 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: ec91a2be3c44d88e1a3960a4937ad6ed3b63464e → e026c93888f91a47a9c9f4e029f3eb07d96375e6](https://github.com/psf/black/compare/ec91a2be3c44d88e1a3960a4937ad6ed3b63464e...e026c93888f91a47a9c9f4e029f3eb07d96375e6) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 25b53f36..aea73365 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,7 +17,7 @@ repos: - id: check-added-large-files - repo: https://github.com/psf/black - rev: ec91a2be3c44d88e1a3960a4937ad6ed3b63464e # frozen: 23.12.1 + rev: e026c93888f91a47a9c9f4e029f3eb07d96375e6 # frozen: 24.1.1 hooks: - id: black From 4ec2ed5519cb4653b1f205aea3d0afdd7f85c9ae Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 17:18:46 +0000 Subject: [PATCH 2/2] =?UTF-8?q?'[pre-commit.ci=20=F0=9F=A4=96]=20Apply=20c?= =?UTF-8?q?ode=20format=20tools=20to=20PR'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- numpydoc/__init__.py | 1 + numpydoc/__main__.py | 1 + numpydoc/docscrape.py | 1 + numpydoc/docscrape_sphinx.py | 8 +++++--- numpydoc/numpydoc.py | 1 + 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/numpydoc/__init__.py b/numpydoc/__init__.py index 97f53053..5458b67f 100644 --- a/numpydoc/__init__.py +++ b/numpydoc/__init__.py @@ -2,6 +2,7 @@ This package provides the numpydoc Sphinx extension for handling docstrings formatted according to the NumPy documentation format. """ + from ._version import __version__ diff --git a/numpydoc/__main__.py b/numpydoc/__main__.py index 4a50da9b..53d5c504 100644 --- a/numpydoc/__main__.py +++ b/numpydoc/__main__.py @@ -1,6 +1,7 @@ """ Implementing `python -m numpydoc` functionality. """ + import sys import argparse import ast diff --git a/numpydoc/docscrape.py b/numpydoc/docscrape.py index 315be6c3..4fbbe63c 100644 --- a/numpydoc/docscrape.py +++ b/numpydoc/docscrape.py @@ -1,6 +1,7 @@ """Extract reference documentation from the NumPy source tree. """ + import inspect import textwrap import re diff --git a/numpydoc/docscrape_sphinx.py b/numpydoc/docscrape_sphinx.py index 26a8e6b3..771c1ea4 100644 --- a/numpydoc/docscrape_sphinx.py +++ b/numpydoc/docscrape_sphinx.py @@ -373,9 +373,11 @@ def __str__(self, indent=0, func_role="obj"): "notes": self._str_section("Notes"), "references": self._str_references(), "examples": self._str_examples(), - "attributes": self._str_param_list("Attributes", fake_autosummary=True) - if self.attributes_as_param_list - else self._str_member_list("Attributes"), + "attributes": ( + self._str_param_list("Attributes", fake_autosummary=True) + if self.attributes_as_param_list + else self._str_member_list("Attributes") + ), "methods": self._str_member_list("Methods"), } ns = {k: "\n".join(v) for k, v in ns.items()} diff --git a/numpydoc/numpydoc.py b/numpydoc/numpydoc.py index 335de5a8..3513f95c 100644 --- a/numpydoc/numpydoc.py +++ b/numpydoc/numpydoc.py @@ -16,6 +16,7 @@ .. [1] https://github.com/numpy/numpydoc """ + from copy import deepcopy import re import pydoc