-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrap docstrings to 88 characters #2926
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, when running make format
locally on this branch, it finds a few docstrings which seem to be not updated yet:
(pygmt) yfroe@gpiseis16:~/Documents/01_GitHub/github_pygmt/pygmt> make format
docformatter --in-place pygmt doc/conf.py examples
ruff check --fix pygmt doc/conf.py examples
ruff format pygmt doc/conf.py examples
282 files left unchanged
(pygmt) yfroe@gpiseis16:~/Documents/01_GitHub/github_pygmt/pygmt> git diff
diff --git a/pygmt/__init__.py b/pygmt/__init__.py
index 0d22a604..6c98248a 100644
--- a/pygmt/__init__.py
+++ b/pygmt/__init__.py
@@ -80,8 +80,8 @@ def print_clib_info(file=sys.stdout):
"""
Print information about the GMT shared library that we can find.
- Includes the GMT version, default values for parameters, the path to the
- ``libgmt`` shared library, and GMT directories.
+ Includes the GMT version, default values for parameters, the path to the ``libgmt``
+ shared library, and GMT directories.
"""
from pygmt.clib import Session
diff --git a/pygmt/helpers/decorators.py b/pygmt/helpers/decorators.py
index 2db4784f..8c60afe1 100644
--- a/pygmt/helpers/decorators.py
+++ b/pygmt/helpers/decorators.py
@@ -2,8 +2,7 @@
Decorators to help wrap the GMT modules.
Apply them to functions wrapping GMT modules to automate: alias generation for
-arguments, insert common text into docstrings, transform arguments to strings,
-etc.
+arguments, insert common text into docstrings, transform arguments to strings, etc.
"""
import functools
import textwrap
diff --git a/pygmt/session_management.py b/pygmt/session_management.py
index 4bb82983..6d935175 100644
--- a/pygmt/session_management.py
+++ b/pygmt/session_management.py
@@ -23,10 +23,10 @@ def end():
"""
Terminate GMT modern mode session and optionally produce the figure files.
- Called after :func:`pygmt.begin` and all commands that you want included in
- a session. Will finalize any PostScript plots that were made in the
- background, convert them to the desired format (specified in
- ``pygmt.begin``), and bring the figures to the working directory.
+ Called after :func:`pygmt.begin` and all commands that you want included in a
+ session. Will finalize any PostScript plots that were made in the background,
+ convert them to the desired format (specified in ``pygmt.begin``), and bring the
+ figures to the working directory.
"""
with Session() as lib:
lib.call_module(module="end", args="")
diff --git a/pygmt/tests/test_grdgradient.py b/pygmt/tests/test_grdgradient.py
index 879be7fb..20536230 100644
--- a/pygmt/tests/test_grdgradient.py
+++ b/pygmt/tests/test_grdgradient.py
@@ -75,8 +75,8 @@ def test_grdgradient_fails(grid):
"""
Check that grdgradient fails correctly.
- Check that grdgradient fails correctly when `tiles` is specified but
- normalize is not.
+ Check that grdgradient fails correctly when `tiles` is specified but normalize is
+ not.
"""
with pytest.raises(GMTInvalidInput):
grdgradient(grid=grid) # fails without required arguments
Maybe you're using an old version of docformatter? |
Ah, you are right! After updating to docformatter 1.7.5, these violations are no longer reported. |
Description of proposed changes
As mentioned in #962 (comment), this PR changes
wrap-summaries
andwrap-descriptions
to 88 and reformat all docstrings. Please note that descriptions are not re-wrapped due to known docformatter limitations.Address #962. Related to a follow-up PR #2925.