From 49a5574a6a31946032513c072b85516d00b2e111 Mon Sep 17 00:00:00 2001 From: Marcelo Trevisani Date: Wed, 13 Nov 2024 07:59:24 +0000 Subject: [PATCH] Update CLIConfig type hint for singleton instance Replaced the type hint for the `__instance` attribute in `CLIConfig` from `"CLIConfig"` to `Self` to improve type checking and readability. Signed-off-by: Marcelo Trevisani --- grayskull/cli/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/grayskull/cli/__init__.py b/grayskull/cli/__init__.py index b3ea7a625..3f5d8ae78 100644 --- a/grayskull/cli/__init__.py +++ b/grayskull/cli/__init__.py @@ -1,3 +1,5 @@ +from typing import Self + import progressbar WIDGET_BAR_DOWNLOAD = [ @@ -11,7 +13,7 @@ class CLIConfig: - __instance: "CLIConfig" | None = None + __instance: Self | None = None def __new__(cls, stdout: bool = False, list_missing_deps: bool = False): if CLIConfig.__instance is None: