mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Fix mypy warning
CURA-6665
This commit is contained in:
parent
08b1e0e9a8
commit
5436e68ea4
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
import functools
|
||||
import re
|
||||
from typing import Callable
|
||||
|
||||
# An API version must be a semantic version "x.y.z" where ".z" is optional. So the valid formats are as follows:
|
||||
# - x.y.z
|
||||
|
@ -16,7 +17,7 @@ SEMANTIC_VERSION_REGEX = re.compile(r"^[0-9]+\.[0-9]+(\.[0-9]+)?$")
|
|||
# \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:
|
||||
def api(since_version: str) -> Callable:
|
||||
# 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