-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update Python type stubs to reflect latest changes to styles module
- Loading branch information
Showing
2 changed files
with
96 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
from collections.abc import Iterator | ||
from typing import Self | ||
|
||
class Attribute: | ||
"""Text attributes other than color.""" | ||
Bold: Attribute = ... | ||
Thin: Attribute = ... | ||
Italic: Attribute = ... | ||
Underlined: Attribute = ... | ||
Blinking: Attribute = ... | ||
Reversed: Attribute = ... | ||
Hidden: Attribute = ... | ||
Stricken: Attribute = ... | ||
NotBoldOrThin: Attribute = ... | ||
NotItalic: Attribute = ... | ||
NotUnderlined: Attribute = ... | ||
NotBlinking: Attribute = ... | ||
NotReversed: Attribute = ... | ||
NotHidden: Attribute = ... | ||
NotStricken: Attribute = ... | ||
|
||
@staticmethod | ||
def all() -> AllAttributes: ... | ||
|
||
def __hash__(self) -> int: ... | ||
def __eq__(self, other: object) -> bool: ... | ||
def __ne__(self, other: object) -> bool: ... | ||
|
||
|
||
class AllAttributes: | ||
"""An iterator over all attributes.""" | ||
def drain(self) -> None: ... | ||
def __iter__(self) -> Self: ... | ||
def __next__(self) -> Attribute: ... | ||
|
||
|
||
class Format: | ||
"""Terminal formatting.""" | ||
def __new__(cls) -> Self: ... | ||
def bold(self) -> Self: ... | ||
def thin(self) -> Self: ... | ||
def italic(self) -> Self: ... | ||
def underlined(self) -> Self: ... | ||
def blinking(self) -> Self: ... | ||
def reversed(self) -> Self: ... | ||
def hidden(self) -> Self: ... | ||
def stricken(self) -> Self: ... | ||
def has(self, format: Format) -> bool: ... | ||
def formats(self) -> Iterator[Format]: ... | ||
def __invert__(self) -> Self: ... | ||
def __sub__(self, other: Self) -> Self: ... | ||
def __hash__(self) -> int: ... | ||
def __eq__(self, other: object) -> bool: ... | ||
def __ne__(self, other: object) -> bool: ... |