From 87353284ea705f62d939fecf521353b56b9e1526 Mon Sep 17 00:00:00 2001 From: Nick Touran Date: Fri, 19 Nov 2021 10:36:17 -0800 Subject: [PATCH] Add backticks around *args in docstring. Having parameter docs named *args and **kwargs in a docstring was causing downstream errors in sphinx where sphinx thought it was going to be an italic block with a following asterisk or two. docutils recommends that things like this should be liberals: https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#inline-markup-recognition-rules --- yamlize/maps.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yamlize/maps.py b/yamlize/maps.py index d21da8e..5a8acda 100644 --- a/yamlize/maps.py +++ b/yamlize/maps.py @@ -53,8 +53,8 @@ def __new__(cls, *args, **kwargs): """ Explicit implementation of __new__ to assign __data as an attribute. - :param *args: sequence of key/value pairs. - :param **kwargs: kwargs for input to OrderedDict. + :param ``*args``: sequence of key/value pairs. + :param ``**kwargs``: kwargs for input to OrderedDict. """ self = Object.__new__(cls) self.__data = OrderedDict() @@ -64,8 +64,8 @@ def __init__(self, *args, **kwargs): """ Initialize a Map. - :param *args: sequence of key/value pairs. - :param **kwargs: kwargs for input to OrderedDict. + :param ``*args``: sequence of key/value pairs. + :param ``**kwargs``: kwargs for input to OrderedDict. """ Object.__init__(self) self.__data = OrderedDict(*args, **kwargs)