Skip to content

Commit 4771349

Browse files
dwhswensonsroet
andauthored
Apply suggestions from code review
Co-authored-by: Sander Roet <sanderroet@hotmail.com>
1 parent 4b3ab8e commit 4771349

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

‎docs/plugins.rst‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ where the CLI knows to look for it. The input parameters to
1717
``OPSCommandPlugin`` are:
1818

1919
* ``command``: This is the main CLI function for the subcommand. It must be
20-
decorated as a ``click.Command``.
20+
decorated as a ``click.command``.
2121
* ``section``: This is a string to determine where to show it in help (what
2222
kind of command it is). Valid values are ``"Simulation"``,
2323
``"Analysis"``, ``"Miscellaneous"``, or ``"Workflow"``. If ``section``
@@ -104,4 +104,3 @@ namespace.
104104
.. _native namespace packages:
105105
https://packaging.python.org/guides/packaging-namespace-packages/#native-namespace-packages
106106

107-

‎paths_cli/plugin_management.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def attach_metadata(self, location, plugin_type):
3434
)
3535
if error_condition: # -no-cov-
3636
raise PluginRegistrationError(
37-
"The plugin " + repr(self) + "has been previously "
37+
f"The plugin {repr(self)} has been previously "
3838
"registered with different metadata."
3939
)
4040
self.location = location
@@ -85,7 +85,7 @@ def func(self):
8585
return self.command
8686

8787
def __repr__(self):
88-
return "OPSCommandPlugin(" + self.name + ")"
88+
return f"OPSCommandPlugin({self.name})"
8989

9090
class CLIPluginLoader(object):
9191
"""Abstract object for CLI plugins

0 commit comments

Comments
 (0)