Move type parsers for config into own module

This commit is contained in:
Kovid Goyal
2021-05-24 22:29:28 +05:30
parent a4daa49f70
commit fe94f4cbb4
11 changed files with 392 additions and 372 deletions
-8
View File
@@ -680,11 +680,3 @@ class SSHConnectionData(NamedTuple):
binary: str
hostname: str
port: Optional[int] = None
def positive_int(x: ConvertibleToNumbers) -> int:
return max(0, int(x))
def positive_float(x: ConvertibleToNumbers) -> float:
return max(0, float(x))