mirror of
https://github.com/esphome/esphome.git
synced 2025-03-14 06:38:17 +00:00
tweak
This commit is contained in:
parent
8b03c6a857
commit
9cf8a4558f
@ -1,5 +1,7 @@
|
||||
"""Helpers for config validation using voluptuous."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from contextlib import contextmanager
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime
|
||||
@ -2040,7 +2042,7 @@ class Version:
|
||||
return f"{self.major}.{self.minor}.{self.patch}"
|
||||
|
||||
@classmethod
|
||||
def parse(cls, value: str) -> "Version":
|
||||
def parse(cls, value: str) -> Version:
|
||||
match = re.match(r"^(\d+).(\d+).(\d+)-?\w*$", value)
|
||||
if match is None:
|
||||
raise ValueError(f"Not a valid version number {value}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user