Remove redundant cast to str (fixes mypy strict warn_redundant_casts)
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
from typing import cast
|
||||
|
||||
import click
|
||||
|
||||
@@ -52,7 +51,7 @@ def _prompt_str(
|
||||
value = click.prompt(prompt, default="", hide_input=hide_input, show_default=False)
|
||||
if value == "":
|
||||
return current
|
||||
return cast(str, value)
|
||||
return value
|
||||
|
||||
|
||||
@click.group()
|
||||
@@ -198,4 +197,4 @@ def run() -> None:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
main()
|
||||
Reference in New Issue
Block a user