Skip to content

Commit

Permalink
Update CLIConfig type hint for singleton instance
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
marcelotrevisani committed Nov 13, 2024
1 parent dded1f1 commit 49a5574
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion grayskull/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Self

import progressbar

WIDGET_BAR_DOWNLOAD = [
Expand All @@ -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:
Expand Down

0 comments on commit 49a5574

Please sign in to comment.