Skip to content

Commit

Permalink
use typing instead of typing_extensions
Browse files Browse the repository at this point in the history
The only thing we use from typing_extensions is Litral, which was
stabilized in python 3.8: https://peps.python.org/pep-0586/

This was a third party module and an undocumented dependency, so probably
good to get rid of it :)

Signed-off-by: Tycho Andersen <tycho@tycho.pizza>
  • Loading branch information
tych0 authored and elParaguayo committed Mar 31, 2024
1 parent 4d0b3b2 commit 9e1eaf2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 2 additions & 4 deletions libqtile/confreader.py
Expand Up @@ -29,9 +29,7 @@
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from typing import Any

from typing_extensions import Literal
from typing import Any, Literal

from libqtile.config import Group, Key, Mouse, Rule, Screen
from libqtile.layout.base import Layout
Expand All @@ -43,7 +41,7 @@ class ConfigError(Exception):

config_pyi_header = """
from typing import Any
from typing_extensions import Literal
from typing import Literal
from libqtile.config import Group, Key, Mouse, Rule, Screen
from libqtile.layout.base import Layout
Expand Down
4 changes: 1 addition & 3 deletions libqtile/core/manager.py
Expand Up @@ -59,9 +59,7 @@
from libqtile.widget.base import _Widget

if TYPE_CHECKING:
from typing import Any, Callable

from typing_extensions import Literal
from typing import Any, Callable, Literal

from libqtile.command.base import ItemT
from libqtile.confreader import Config
Expand Down

0 comments on commit 9e1eaf2

Please sign in to comment.