mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Add types to pre-commit
This commit is contained in:
parent
fa536a8693
commit
327ed924a3
62 changed files with 911 additions and 411 deletions
|
|
@ -21,7 +21,7 @@ class InvalidColorSetting(ValueError):
|
|||
pass
|
||||
|
||||
|
||||
def format_color(text, color, use_color_setting):
|
||||
def format_color(text: str, color: str, use_color_setting: bool) -> str:
|
||||
"""Format text with color.
|
||||
|
||||
Args:
|
||||
|
|
@ -38,7 +38,7 @@ def format_color(text, color, use_color_setting):
|
|||
COLOR_CHOICES = ('auto', 'always', 'never')
|
||||
|
||||
|
||||
def use_color(setting):
|
||||
def use_color(setting: str) -> bool:
|
||||
"""Choose whether to use color based on the command argument.
|
||||
|
||||
Args:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue