@@ -121,8 +121,6 @@ def infer_docstring_style(
121121 style_order : list [Parser ] | list [DocstringStyle ] | None = None ,
122122 default : Parser | DocstringStyle | None = None ,
123123 per_style_options : PerStyleOptions | None = None ,
124- # YORE: Bump 2: Remove line.
125- ** options : Any ,
126124) -> tuple [Parser | None , list [DocstringSection ] | None ]:
127125 """Infer the parser to use for the docstring.
128126
@@ -149,14 +147,7 @@ def infer_docstring_style(
149147 """
150148 from griffe ._internal .docstrings .parsers import parsers # noqa: PLC0415
151149
152- # YORE: Bump 2: Replace block with `per_style_options = per_style_options or {}`.
153- if options :
154- if per_style_options :
155- raise ValueError ("Cannot use both `options` and `per_style_options`." )
156- warn ("`**options` is deprecated. Use `per_style_options` instead." , DeprecationWarning , stacklevel = 2 )
157- per_style_options = {"google" : options , "numpy" : options , "sphinx" : options } # type: ignore[assignment]
158- elif not per_style_options :
159- per_style_options = {}
150+ per_style_options = per_style_options or {}
160151
161152 style_order = [Parser (style ) if isinstance (style , str ) else style for style in style_order or _default_style_order ]
162153
@@ -203,8 +194,6 @@ def parse_auto(
203194 style_order : list [Parser ] | list [DocstringStyle ] | None = None ,
204195 default : Parser | DocstringStyle | None = None ,
205196 per_style_options : PerStyleOptions | None = None ,
206- # YORE: Bump 2: Remove line.
207- ** options : Any ,
208197) -> list [DocstringSection ]:
209198 """Parse a docstring by automatically detecting the style it uses.
210199
@@ -224,14 +213,7 @@ def parse_auto(
224213 """
225214 from griffe ._internal .docstrings .parsers import parse # noqa: PLC0415
226215
227- # YORE: Bump 2: Replace block with `per_style_options = per_style_options or {}`.
228- if options :
229- if per_style_options :
230- raise ValueError ("Cannot use both `options` and `per_style_options`." )
231- warn ("`**options` are deprecated. Use `per_style_options` instead." , DeprecationWarning , stacklevel = 2 )
232- per_style_options = {"google" : options , "numpy" : options , "sphinx" : options } # type: ignore[assignment]
233- elif not per_style_options :
234- per_style_options = {}
216+ per_style_options = per_style_options or {}
235217
236218 style , sections = infer_docstring_style (
237219 docstring ,
0 commit comments