ruff format

This commit is contained in:
2025-05-09 23:25:21 +03:00
parent 9a78aa9263
commit 13f7e33db1
29 changed files with 471 additions and 298 deletions
+14 -11
View File
@@ -1,10 +1,8 @@
from typing import Literal, Pattern
class BaseFlag:
def __init__(self, name: str,
prefix: Literal['-', '--', '---'] = '--') -> None:
def __init__(self, name: str, prefix: Literal["-", "--", "---"] = "--") -> None:
"""
Private. Base class for flags
:param name: the name of the flag
@@ -41,9 +39,12 @@ class BaseFlag:
class Flag(BaseFlag):
def __init__(self, name: str,
prefix: Literal['-', '--', '---'] = '--',
possible_values: list[str] | Pattern[str] | False = True) -> None:
def __init__(
self,
name: str,
prefix: Literal["-", "--", "---"] = "--",
possible_values: list[str] | Pattern[str] | False = True,
) -> None:
"""
Public. The entity of the flag being registered for subsequent processing
:param name: The name of the flag
@@ -85,9 +86,9 @@ class Flag(BaseFlag):
class InputFlag(BaseFlag):
def __init__(self, name: str,
prefix: Literal['-', '--', '---'] = '--',
value: str = None):
def __init__(
self, name: str, prefix: Literal["-", "--", "---"] = "--", value: str = None
):
"""
Public. The entity of the flag of the entered command
:param name: the name of the input flag
@@ -114,5 +115,7 @@ class InputFlag(BaseFlag):
self._flag_value = value
def __eq__(self, other) -> bool:
return self.get_string_entity() == other.get_string_entity() and self.get_value() == other.get_value()
return (
self.get_string_entity() == other.get_string_entity()
and self.get_value() == other.get_value()
)