From 1819d374df7a3421b7a69944d5f95b9518e4b7f8 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:19:07 +0100 Subject: [PATCH] FIX: Restore D213 in flake8 This got accidentally ignored in #25147. We want D213 (#17125, #17193) https://matplotlib.org/devdocs/devel/document.html#quote-positions --- .flake8 | 4 +++- lib/matplotlib/pyplot.py | 3 ++- tools/gh_api.py | 3 +-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.flake8 b/.flake8 index 40c07e0e324b..b568af917f46 100644 --- a/.flake8 +++ b/.flake8 @@ -18,7 +18,9 @@ ignore = D301, D400, D401, D403, D404 # ignored by pydocstyle numpy docstring convention - D107, D203, D212, D213, D402, D413, D415, D416, D417, + D107, D203, D212, D402, D413, D415, D416, D417, + # while D213 is ignored by the numpy docstring convention, it's left out above, + # because we want to enforce it. exclude = .git diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index 6318b99539df..59fc02000983 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -1002,7 +1002,8 @@ def gcf() -> Figure: def fignum_exists(num: int | str) -> bool: - """Return whether the figure with the given id exists. + """ + Return whether the figure with the given id exists. Parameters ---------- diff --git a/tools/gh_api.py b/tools/gh_api.py index 2590fe712bd4..10119793ede9 100644 --- a/tools/gh_api.py +++ b/tools/gh_api.py @@ -97,8 +97,7 @@ def post_gist(content, description='', filename='file', auth=False): return response_data['html_url'] def get_pull_request(project, num, auth=False): - """get pull request info by number - """ + """Return the pull request info for a given PR number.""" url = f"https://api.github.com/repos/{project}/pulls/{num}" if auth: header = make_auth_header()