gonna figure it out
This commit is contained in:
17
.venv/lib/python3.12/site-packages/geoalchemy2/utils.py
Normal file
17
.venv/lib/python3.12/site-packages/geoalchemy2/utils.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""Some utils for the GeoAlchemy2 package."""
|
||||
|
||||
|
||||
def authorized_values_in_docstring(**kwargs):
|
||||
"""Decorator to replace keywords in docstrings by the actual value of a variable.
|
||||
|
||||
.. Note::
|
||||
The keyword must be enclose by <> in the docstring, like <MyKeyword>.
|
||||
"""
|
||||
|
||||
def inner(func):
|
||||
if func.__doc__ is not None:
|
||||
for k, v in kwargs.items():
|
||||
func.__doc__ = func.__doc__.replace(f"<{k}>", str(v))
|
||||
return func
|
||||
|
||||
return inner
|
||||
Reference in New Issue
Block a user