mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 18:57:52 -06:00
Convert remaining doxygen to rst
This commit is contained in:
parent
fe779d9501
commit
c2c96faf5f
49 changed files with 2163 additions and 1657 deletions
|
@ -11,13 +11,15 @@ from typing import Callable
|
|||
SEMANTIC_VERSION_REGEX = re.compile(r"^[0-9]+\.[0-9]+(\.[0-9]+)?$")
|
||||
|
||||
|
||||
## Decorator for functions that belong to a set of APIs. For now, this should only be used for officially supported
|
||||
# APIs, meaning that those APIs should be versioned and maintained.
|
||||
#
|
||||
# \param since_version The earliest version since when this API becomes supported. This means that since this version,
|
||||
# this API function is supposed to behave the same. This parameter is not used. It's just a
|
||||
# documentation.
|
||||
def api(since_version: str) -> Callable:
|
||||
"""Decorator for functions that belong to a set of APIs. For now, this should only be used for officially supported
|
||||
|
||||
APIs, meaning that those APIs should be versioned and maintained.
|
||||
|
||||
:param since_version: The earliest version since when this API becomes supported. This means that since this version,
|
||||
this API function is supposed to behave the same. This parameter is not used. It's just a
|
||||
documentation.
|
||||
"""
|
||||
# Make sure that APi versions are semantic versions
|
||||
if not SEMANTIC_VERSION_REGEX.fullmatch(since_version):
|
||||
raise ValueError("API since_version [%s] is not a semantic version." % since_version)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue