Skip to content

Commit

Permalink
Fix docstring indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Sep 14, 2023
1 parent 9691888 commit dbaf57a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
4 changes: 1 addition & 3 deletions docs/_writing_argparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@ since in most cases ``argparse`` does not distinguish between input and output
files all file parameters will be rendered as input parameters of the tool.

Please open an issue if you have ideas on how to improve the generated tools:
https://github.com/galaxyproject/planemo/issues


https://github.com/galaxyproject/planemo/issues
6 changes: 3 additions & 3 deletions planemo/autopygen/argument_parser_conversion.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Functions used to extract initialized ArgumentParser from target source code,
and to transform it into easily usable ParamInfo class containing
all the necessary info for 'inputs' element initialization
all the necessary info for 'inputs' element initialization
"""
import ast
import logging
Expand Down Expand Up @@ -57,7 +57,7 @@ def obtain_and_convert_parser(path: str) -> Optional[DecoyParser]:
Parameters
----------
path : str
path to the source file containing argument parser init
path to the source file containing argument parser init
Returns
-------
Expand All @@ -80,7 +80,7 @@ def obtain_and_convert_parser_from_str(text: str) -> Optional[ArgumentParser]:
Parameters
----------
text : str
variable containing target source code
variable containing target source code
Returns
-------
Expand Down
21 changes: 11 additions & 10 deletions planemo/autopygen/commands/command_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
are parts of template, separated from the rest by comments
with specific structure
Example of the comments:
## foo definition
... block itself ...
## end foo definition
Expand Down Expand Up @@ -42,8 +43,8 @@ def create_flag(
comment : str
wrapping comment
depth : int
integer, used to set the depth of the current element.
This value is used to indent the block properly
integer, used to set the depth of the current element.
This value is used to indent the block properly
indent : int
default value for size of the block indent
add_comment : bool
Expand Down Expand Up @@ -73,18 +74,18 @@ def create_element_with_body(
Parameters
----------
kind : str
string defining what kind of element is created, for example if or for
(loop)
string defining what kind of element is created, for example if or for
(loop)
head : str
body of block header, for example predicate of condition, or the
body of loop
body of block header, for example predicate of condition, or the
body of loop
body : str
body of the block, can be another element
body of the block, can be another element
comment : str
comment, used to set the start and end of the block
comment, used to set the start and end of the block
depth : int
integer, used to set the depth of the current element.
This value is used to indent the block properly
integer, used to set the depth of the current element.
This value is used to indent the block properly
indent : int
default value for size of the block indent
body_indented : bool
Expand Down
13 changes: 7 additions & 6 deletions planemo/autopygen/source_file_parsing/local_module_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ class UnknownNamesRemoval(ast.NodeVisitor):
Attributes
---
unknown: Set[str]
set of names that represent variables used in parser initialization,
that have not been resolved yet
set of names that represent variables used in parser initialization,
that have not been resolved yet
"""

Expand Down Expand Up @@ -104,10 +105,10 @@ def handle_local_module_names(actions: List[ast.AST], unknown_names: Set[str]) -
Parameters
----------
actions : List[ast.AST]
list of actions extracted so far
unknown_names :
set of unknown names that have to be extracted
actions: List[ast.AST]
list of actions extracted so far
unknown_names:
set of unknown names that have to be extracted
Returns
-------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class SimpleParserDiscoveryAndReplacement(Discovery):
"""
Class responsible for discovery of ArgumentParser creation
and assignment, and replacement of the class definition
by the one supplied through constructor
by the one supplied through constructor
"""

def __init__(
Expand Down Expand Up @@ -230,7 +230,7 @@ def get_parser_init_and_actions(source: ast.Module) -> Tuple[List[ast.AST], str,
Parameters
----------
source : ast.Module
source file parsed into ATT
source file parsed into ATT
Returns
-------
Expand Down

0 comments on commit dbaf57a

Please sign in to comment.