-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add stubs for "click-log" package (#13207)
- Loading branch information
1 parent
57d2e04
commit 2c27933
Showing
4 changed files
with
34 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
version = "0.4.*" | ||
requires = ["click>=8.0.0"] | ||
upstream_repository = "https://github.com/click-contrib/click-log" |
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,4 @@ | ||
from .core import ClickHandler as ClickHandler, ColorFormatter as ColorFormatter, basic_config as basic_config | ||
from .options import simple_verbosity_option as simple_verbosity_option | ||
|
||
__version__: str |
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,15 @@ | ||
import logging | ||
|
||
LOGGER_KEY: str | ||
DEFAULT_LEVEL: int | ||
PY2: bool | ||
text_type: type | ||
|
||
class ColorFormatter(logging.Formatter): | ||
colors: dict[str, dict[str, str]] | ||
def format(self, record: logging.LogRecord) -> str: ... | ||
|
||
class ClickHandler(logging.Handler): | ||
def emit(self, record: logging.LogRecord) -> None: ... | ||
|
||
def basic_config(logger: logging.Logger | str | None = None) -> None: ... |
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,12 @@ | ||
import logging | ||
import typing as t | ||
from typing_extensions import TypeAlias | ||
|
||
import click | ||
|
||
_AnyCallable: TypeAlias = t.Callable[..., t.Any] | ||
_FC = t.TypeVar("_FC", bound=_AnyCallable | click.Command) | ||
|
||
def simple_verbosity_option( | ||
logger: logging.Logger | str | None = None, *names: str, **kwargs: t.Any | ||
) -> t.Callable[[_FC], _FC]: ... |