Remove humanfriendly stubs (#13699)

This commit is contained in:
Sebastian Rittau
2025-03-23 23:41:53 +01:00
committed by GitHub
parent a4f1992176
commit 798c660ab7
17 changed files with 0 additions and 418 deletions
@@ -1,25 +0,0 @@
# TODO: missing from stub
humanfriendly.__all__
humanfriendly.case.__all__
humanfriendly.cli.__all__
humanfriendly.compat.__all__
humanfriendly.decorators.__all__
humanfriendly.deprecation.__all__
humanfriendly.prompts.__all__
humanfriendly.sphinx.__all__
humanfriendly.tables.__all__
humanfriendly.terminal.__all__
humanfriendly.terminal.html.__all__
humanfriendly.terminal.spinners.__all__
humanfriendly.testing.__all__
humanfriendly.text.__all__
humanfriendly.usage.__all__
# Re-exports:
humanfriendly.usage.import_module
humanfriendly.compat.which
humanfriendly.compat.name2codepoint
humanfriendly.compat.monotonic
# Tests are not included into stubs:
humanfriendly.tests
-8
View File
@@ -1,8 +0,0 @@
version = "10.0.*"
upstream_repository = "https://github.com/xolox/python-humanfriendly"
no_longer_updated = true
[tool.stubtest]
stubtest_requirements = ["docutils", "mock"]
# Package is unsupported and doesn't support Python 3.13 as of 2025-03-17.
skip = true
@@ -1,57 +0,0 @@
import datetime
from _typeshed import Incomplete
from re import Pattern
from types import TracebackType
from typing import Any, NamedTuple
class SizeUnit(NamedTuple):
divider: int
symbol: str
name: str
class CombinedUnit(NamedTuple):
decimal: SizeUnit
binary: SizeUnit
disk_size_units: Any
length_size_units: Any
time_units: Any
def coerce_boolean(value: object) -> bool: ...
def coerce_pattern(value: str | Pattern[str], flags: int = 0) -> Pattern[str]: ...
def coerce_seconds(value: float | datetime.timedelta) -> float: ...
def format_size(num_bytes: float, keep_width: bool = False, binary: bool = False) -> str: ...
def parse_size(size: str, binary: bool = False) -> int: ...
def format_length(num_metres: float, keep_width: bool = False) -> str: ...
def parse_length(length: str) -> float: ...
def format_number(number: float, num_decimals: int = 2) -> str: ...
def round_number(count: float, keep_width: bool = False) -> str: ...
def format_timespan(num_seconds: float | datetime.timedelta, detailed: bool = False, max_units: int = 3) -> str: ...
def parse_timespan(timespan: str) -> float: ...
def parse_date(datestring: str) -> tuple[int, int, int, int, int, int]: ...
def format_path(pathname: str) -> str: ...
def parse_path(pathname: str) -> str: ...
class Timer:
monotonic: bool
resumable: bool
start_time: float
total_time: float
def __init__(self, start_time: Incomplete | None = None, resumable: bool = False) -> None: ...
def __enter__(self): ...
def __exit__(
self,
exc_type: type[BaseException] | None = None,
exc_value: BaseException | None = None,
traceback: TracebackType | None = None,
) -> None: ...
def sleep(self, seconds: float) -> None: ...
@property
def elapsed_time(self): ...
@property
def rounded(self): ...
class InvalidDate(Exception): ...
class InvalidSize(Exception): ...
class InvalidLength(Exception): ...
class InvalidTimespan(Exception): ...
@@ -1,27 +0,0 @@
from _typeshed import Incomplete
from collections import OrderedDict
from typing import TypeVar
from humanfriendly.compat import unicode
_KT = TypeVar("_KT")
_VT = TypeVar("_VT")
class CaseInsensitiveDict(OrderedDict[_KT, _VT]):
def __init__(self, other: Incomplete | None = None, **kw) -> None: ...
def coerce_key(self, key): ...
@classmethod
def fromkeys(cls, iterable, value: Incomplete | None = None): ...
def get(self, key, default: Incomplete | None = None): ...
def pop(self, key, default: Incomplete | None = None): ...
def setdefault(self, key, default: Incomplete | None = None): ...
def update(self, other: Incomplete | None = None, **kw) -> None: ... # type: ignore[override]
def __contains__(self, key): ...
def __delitem__(self, key) -> None: ...
def __getitem__(self, key): ...
def __setitem__(self, key, value) -> None: ...
class CaseInsensitiveKey(unicode):
def __new__(cls, value): ...
def __hash__(self) -> int: ...
def __eq__(self, other): ...
-13
View File
@@ -1,13 +0,0 @@
from _typeshed import Incomplete
def main() -> None: ...
def run_command(command_line) -> None: ...
def print_formatted_length(value) -> None: ...
def print_formatted_number(value) -> None: ...
def print_formatted_size(value, binary) -> None: ...
def print_formatted_table(delimiter) -> None: ...
def print_formatted_timespan(value) -> None: ...
def print_parsed_length(value) -> None: ...
def print_parsed_size(value) -> None: ...
def demonstrate_ansi_formatting() -> None: ...
def demonstrate_256_colors(i, j, group: Incomplete | None = None) -> None: ...
@@ -1,13 +0,0 @@
from html.parser import HTMLParser as HTMLParser
from io import StringIO as StringIO
unicode = str
unichr = chr
basestring = str
interactive_prompt = input
def coerce_string(value): ...
def is_string(value): ...
def is_unicode(value): ...
def on_macos(): ...
def on_windows(): ...
@@ -1,3 +0,0 @@
RESULTS_ATTRIBUTE: str
def cached(function): ...
@@ -1,14 +0,0 @@
import types
from typing import Any
def define_aliases(module_name, **aliases) -> None: ...
def get_aliases(module_name): ...
def deprecated_args(*names): ...
def is_method(function): ...
class DeprecationProxy(types.ModuleType):
module: Any
aliases: Any
def __init__(self, module, aliases) -> None: ...
def __getattr__(self, name: str): ...
def resolve(self, target): ...
@@ -1,14 +0,0 @@
from _typeshed import Incomplete
from typing import Any
MAX_ATTEMPTS: int
logger: Any
def prompt_for_confirmation(question, default: Incomplete | None = None, padding: bool = True): ...
def prompt_for_choice(choices, default: Incomplete | None = None, padding: bool = True): ...
def prompt_for_input(question, default: Incomplete | None = None, padding: bool = True, strip: bool = True): ...
def prepare_prompt_text(prompt_text, **options): ...
def prepare_friendly_prompts() -> None: ...
def retry_limit(limit=10) -> None: ...
class TooManyInvalidReplies(Exception): ...
@@ -1,15 +0,0 @@
from typing import Any
logger: Any
def deprecation_note_callback(app, what, name, obj, options, lines) -> None: ...
def enable_deprecation_notes(app) -> None: ...
def enable_man_role(app) -> None: ...
def enable_pypi_role(app) -> None: ...
def enable_special_methods(app) -> None: ...
def enable_usage_formatting(app) -> None: ...
def man_role(role, rawtext, text, lineno, inliner, options={}, content=[]): ...
def pypi_role(role, rawtext, text, lineno, inliner, options={}, content=[]): ...
def setup(app): ...
def special_methods_callback(app, what, name, obj, skip, options): ...
def usage_message_callback(app, what, name, obj, options, lines) -> None: ...
@@ -1,6 +0,0 @@
from _typeshed import Incomplete
def format_smart_table(data, column_names): ...
def format_pretty_table(data, column_names: Incomplete | None = None, horizontal_bar: str = "-", vertical_bar: str = "|"): ...
def format_robust_table(data, column_names): ...
def format_rst_table(data, column_names: Incomplete | None = None): ...
@@ -1,38 +0,0 @@
from _typeshed import Incomplete
from typing import Any
ANSI_CSI: str
ANSI_SGR: str
ANSI_ERASE_LINE: Any
ANSI_RESET: Any
ANSI_HIDE_CURSOR: Any
ANSI_SHOW_CURSOR: Any
ANSI_COLOR_CODES: Any
ANSI_TEXT_STYLES: Any
CLEAN_OUTPUT_PATTERN: Any
DEFAULT_LINES: int
DEFAULT_COLUMNS: int
DEFAULT_ENCODING: str
HIGHLIGHT_COLOR: Any
def ansi_strip(text, readline_hints: bool = True): ...
def ansi_style(**kw): ...
def ansi_width(text): ...
def ansi_wrap(text, **kw): ...
def auto_encode(stream, text, *args, **kw) -> None: ...
def clean_terminal_output(text): ...
def connected_to_terminal(stream: Incomplete | None = None): ...
def enable_ansi_support(): ...
def find_terminal_size(): ...
def find_terminal_size_using_ioctl(stream): ...
def find_terminal_size_using_stty(): ...
def get_pager_command(text: Incomplete | None = None): ...
def have_windows_native_ansi_support(): ...
def message(text, *args, **kw) -> None: ...
def output(text, *args, **kw) -> None: ...
def readline_strip(expr): ...
def readline_wrap(expr): ...
def show_pager(formatted_text, encoding="UTF-8") -> None: ...
def terminal_supports_colors(stream: Incomplete | None = None): ...
def usage(usage_text) -> None: ...
def warning(text, *args, **kw) -> None: ...
@@ -1,32 +0,0 @@
from _typeshed import Incomplete
from typing import Any
from humanfriendly.compat import HTMLParser
def html_to_ansi(data, callback: Incomplete | None = None): ...
class HTMLConverter(HTMLParser):
BLOCK_TAGS: Any
callback: Any
output: Any
def __init__(self, *args, **kw) -> None: ...
def __call__(self, data): ...
@property
def current_style(self): ...
stack: Any
def close(self) -> None: ...
def emit_style(self, style: Incomplete | None = None) -> None: ...
def handle_charref(self, value) -> None: ...
link_text: Any
def handle_data(self, data) -> None: ...
def handle_endtag(self, tag) -> None: ...
def handle_entityref(self, name) -> None: ...
link_url: Any
def handle_starttag(self, tag, attrs) -> None: ...
def normalize_url(self, url): ...
def parse_color(self, value): ...
def push_styles(self, **changes) -> None: ...
def render_url(self, url): ...
preformatted_text_level: int
def reset(self) -> None: ...
def urls_match(self, a, b): ...
@@ -1,42 +0,0 @@
from _typeshed import Incomplete
from types import TracebackType
from typing import Any
GLYPHS: Any
MINIMUM_INTERVAL: float
class Spinner:
interactive: Any
interval: Any
label: Any
states: Any
stream: Any
timer: Any
total: Any
counter: int
last_update: int
def __init__(self, **options) -> None: ...
def step(self, progress: int = 0, label: Incomplete | None = None) -> None: ...
def sleep(self) -> None: ...
def clear(self) -> None: ...
def __enter__(self): ...
def __exit__(
self,
exc_type: type[BaseException] | None = None,
exc_value: BaseException | None = None,
traceback: TracebackType | None = None,
) -> None: ...
class AutomaticSpinner:
label: Any
show_time: Any
shutdown_event: Any
subprocess: Any
def __init__(self, label, show_time: bool = True) -> None: ...
def __enter__(self) -> None: ...
def __exit__(
self,
exc_type: type[BaseException] | None = None,
exc_value: BaseException | None = None,
traceback: TracebackType | None = None,
) -> None: ...
@@ -1,87 +0,0 @@
import unittest
from _typeshed import Incomplete
from types import TracebackType
from typing import Any
from humanfriendly.compat import StringIO
def configure_logging(log_level=10) -> None: ...
def make_dirs(pathname) -> None: ...
def retry(func, timeout: int = 60, exc_type=...): ...
def run_cli(entry_point, *arguments, **options): ...
def skip_on_raise(*exc_types): ...
def touch(filename) -> None: ...
class CallableTimedOut(Exception): ...
class ContextManager:
def __enter__(self): ...
def __exit__(
self,
exc_type: type[BaseException] | None = None,
exc_value: BaseException | None = None,
traceback: TracebackType | None = None,
) -> None: ...
class PatchedAttribute(ContextManager):
object_to_patch: Any
attribute_to_patch: Any
patched_value: Any
original_value: Any
def __init__(self, obj, name, value) -> None: ...
def __enter__(self): ...
class PatchedItem(ContextManager):
object_to_patch: Any
item_to_patch: Any
patched_value: Any
original_value: Any
def __init__(self, obj, item, value) -> None: ...
def __enter__(self): ...
class TemporaryDirectory(ContextManager):
mkdtemp_options: Any
temporary_directory: Any
def __init__(self, **options) -> None: ...
def __enter__(self): ...
class MockedHomeDirectory(PatchedItem, TemporaryDirectory):
def __init__(self) -> None: ...
patched_value: Any
def __enter__(self): ...
class CustomSearchPath(PatchedItem, TemporaryDirectory):
isolated_search_path: Any
def __init__(self, isolated: bool = False) -> None: ...
patched_value: Any
def __enter__(self): ...
@property
def current_search_path(self): ...
class MockedProgram(CustomSearchPath):
program_name: Any
program_returncode: Any
program_script: Any
program_signal_file: Any
def __init__(self, name, returncode: int = 0, script: Incomplete | None = None) -> None: ...
def __enter__(self): ...
def __exit__(self, *args: object, **kw: object): ...
class CaptureOutput(ContextManager):
stdin: Any
stdout: Any
stderr: Any
patched_attributes: Any
def __init__(self, merged: bool = False, input: str = "", enabled: bool = True) -> None: ...
def __enter__(self): ...
def get_lines(self): ...
def get_text(self): ...
def getvalue(self): ...
class CaptureBuffer(StringIO):
def get_lines(self): ...
def get_text(self): ...
class TestCase(unittest.TestCase):
def __init__(self, *args, **kw) -> None: ...
def setUp(self, log_level=10) -> None: ...
@@ -1,17 +0,0 @@
from _typeshed import Incomplete
def compact(text, *args, **kw): ...
def compact_empty_lines(text): ...
def concatenate(items, conjunction: str = "and", serial_comma: bool = False): ...
def dedent(text, *args, **kw): ...
def format(text, *args, **kw): ...
def generate_slug(text, delimiter: str = "-"): ...
def is_empty_line(text): ...
def join_lines(text): ...
def pluralize(count, singular, plural: Incomplete | None = None): ...
def pluralize_raw(count, singular, plural: Incomplete | None = None): ...
def random_string(length=(25, 100), characters=...): ...
def split(text, delimiter: str = ","): ...
def split_paragraphs(text): ...
def tokenize(text): ...
def trim_empty_lines(text): ...
@@ -1,7 +0,0 @@
USAGE_MARKER: str
def format_usage(usage_text): ...
def find_meta_variables(usage_text): ...
def parse_usage(text): ...
def render_usage(text): ...
def inject_usage(module_name) -> None: ...