gonna figure it out

This commit is contained in:
2024-09-28 23:12:43 -07:00
parent b6e3e24aec
commit d637131886
61 changed files with 9059 additions and 174 deletions

View 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