Typings - unihan_etl.types

Typings for unihan-etl.

unihan_etl.types.StrPath

os.PathLike or str

StrPath is based on typeshed’s.

alias of str | PathLike[str]

class unihan_etl.types.Options(source, destination, zip_path, work_dir, fields, format, input_files, download, expand, prune_empty, cache, log_level)[source]

Bases: object

unihan-etl options.

Parameters:
source: str
destination: pathlib.Path
zip_path: pathlib.Path
work_dir: pathlib.Path
fields: tuple[str, ...]
format: UnihanFormats
input_files: list[str]
download: bool
expand: bool
prune_empty: bool
cache: bool
log_level: LogLevel
class unihan_etl.types.ReportHookFn(*args, **kwargs)[source]

Bases: Protocol

Progress bar callback for download().

_abc_impl = <_abc._abc_data object>
_is_protocol = True
class unihan_etl.types.UrlRetrieveFn(*args, **kwargs)[source]

Bases: Protocol

Type annotation for urllib.request.urlretrieve().

_abc_impl = <_abc._abc_data object>
_is_protocol = True