import io
import types
from .python_ext import classproperty as classproperty
from _typeshed import Incomplete
from qtpy import QtCore
from typing import Iterable

TIMESTAMP_ZERO: Incomplete
DEFAULT_TIMESTAMP_FORMAT: str

def now() -> float: ...
def reset_clock() -> None: ...
def exception_str_of_current_frame() -> str: ...
def reraise_exception(message: str = '', toFiles=(), prefix: str = '') -> None: ...
def swallow_exception(message: str = '', toFiles=(), prefix: str = ''): ...

debug: Incomplete
info: Incomplete
warning: Incomplete

def error(message, toFiles=(), prefix: str = '') -> AssertionError: ...
def describe_environment(header: str, toFiles: Iterable[io.StringIO] = ()): ...

class QLogFile:
    name: Incomplete
    textIO: Incomplete
    canClose: Incomplete
    def __init__(self, name: str, textIO: io.TextIOBase, canClose: bool = True) -> None: ...
    def write(self, text: str): ...
    def close(self) -> None: ...

class QLogger(QtCore.QObject):
    messageRecorded: Incomplete
    levels: Incomplete
    prefixes: Incomplete
    def __init__(self, name: str, levels: Iterable['QLogging.LEVEL']) -> None: ...
    def debug(self, message: str): ...
    def info(self, message: str): ...
    def warning(self, message: str): ...
    def error(self, message: str) -> AssertionError: ...
    def swallowException(self, message: str): ...
    def reraiseException(self, message: str = ''): ...
    def toFile(self, fp: str): ...
    def __exit__(self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None) -> None: ...

class QLogging:
    LEVEL: Incomplete
    LEVELS: Incomplete
    LOGGERS: Incomplete
    @staticmethod
    def logger(name: str = '', levels: Iterable['QLogging.LEVEL'] | None = None) -> QLogger: ...
    @classproperty
    def stderr(cls) -> QLogFile: ...
