pyinput-cli 0.1.0__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyinput_cli-0.1.0 → pyinput_cli-0.1.1}/PKG-INFO +1 -1
- {pyinput_cli-0.1.0 → pyinput_cli-0.1.1}/pyinput/pyinput.py +3 -2
- {pyinput_cli-0.1.0 → pyinput_cli-0.1.1}/pyinput_cli.egg-info/PKG-INFO +1 -1
- {pyinput_cli-0.1.0 → pyinput_cli-0.1.1}/pyproject.toml +1 -1
- {pyinput_cli-0.1.0 → pyinput_cli-0.1.1}/LICENSE +0 -0
- {pyinput_cli-0.1.0 → pyinput_cli-0.1.1}/README.md +0 -0
- {pyinput_cli-0.1.0 → pyinput_cli-0.1.1}/pyinput/__init__.py +0 -0
- {pyinput_cli-0.1.0 → pyinput_cli-0.1.1}/pyinput_cli.egg-info/SOURCES.txt +0 -0
- {pyinput_cli-0.1.0 → pyinput_cli-0.1.1}/pyinput_cli.egg-info/dependency_links.txt +0 -0
- {pyinput_cli-0.1.0 → pyinput_cli-0.1.1}/pyinput_cli.egg-info/requires.txt +0 -0
- {pyinput_cli-0.1.0 → pyinput_cli-0.1.1}/pyinput_cli.egg-info/top_level.txt +0 -0
- {pyinput_cli-0.1.0 → pyinput_cli-0.1.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyinput-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: A package for managing user input through the cli, and consistently across projects.
|
|
5
5
|
Author-email: Pedro Alberto Rosquete Ares <rosquetearespedro06@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import math
|
|
2
2
|
from dataclasses import dataclass
|
|
3
|
-
from typing import Any, Callable, Optional, Tuple
|
|
3
|
+
from typing import Any, Callable, Optional, Tuple, Literal
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
@dataclass
|
|
7
7
|
class Validator:
|
|
8
8
|
""" Generic object for reusable validation flow and harden input handling. """
|
|
9
9
|
parser: Callable[[str], Any]
|
|
10
|
-
is_valid: Callable[
|
|
10
|
+
is_valid: Callable[ [Any],
|
|
11
|
+
Tuple[Literal[True], Any] | Tuple[Literal[False], str]]
|
|
11
12
|
error_message: str = "Invalid input"
|
|
12
13
|
max_attempts: Optional[int] = None
|
|
13
14
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyinput-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: A package for managing user input through the cli, and consistently across projects.
|
|
5
5
|
Author-email: Pedro Alberto Rosquete Ares <rosquetearespedro06@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pyinput-cli"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.1"
|
|
8
8
|
description = "A package for managing user input through the cli, and consistently across projects."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|