docscrape
Parse numpy-style docstrings
Based on code from numpy, which is: Copyright (c) 2005-2022, NumPy Developers. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of the NumPy Developers nor the names of any
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
Parameter
def Parameter(
name, type, desc
):
Parameter(name, type, desc)
NumpyDocString
def NumpyDocString(
docstring, config=None,
supported_sections:list=['Summary', 'Extended', 'Yields', 'Receives', 'Other', 'Raises', 'Warns', 'Warnings', 'See', 'Also', 'Notes', 'References', 'Examples', 'Attributes', 'Methods'],
supports_params:set={'Methods', 'Raises', 'Warns', 'Other Parameters', 'Receives', 'Attributes', 'Parameters', 'Yields'}
):
Parses a numpydoc string to an abstract representation
dedent_lines
def dedent_lines(
lines, split:bool=True
):
Deindent a list of lines maximally