Skip to content

Commit 82671e0

Browse files
committed
chore: typing
1 parent 18e69cb commit 82671e0

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

prettyqt/utils/listdelegators.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Any, Literal, SupportsIndex, TypeVar, overload
3+
from typing import TYPE_CHECKING, Any, Literal, SupportsIndex, overload
44

55
from prettyqt.utils import helpers
66

@@ -10,10 +10,8 @@
1010

1111
from prettyqt.utils import fx
1212

13-
T = TypeVar("T")
1413

15-
16-
class ListDelegator(list[T]):
14+
class ListDelegator[T](list[T]):
1715
"""Delegates method calls to all list members."""
1816

1917
def __init__(self, *args, parent=None):

prettyqt/utils/syncedproperty.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
import functools
6+
from typing import ClassVar
67

78
from prettyqt.qt import QtCore
89

@@ -63,7 +64,7 @@ class MakeNotified:
6364
Creates the modified classes just once, on initialization.
6465
"""
6566

66-
change_methods = {
67+
change_methods: ClassVar[dict[type, list[str]]] = {
6768
list: [
6869
"__delitem__",
6970
"__iadd__",

0 commit comments

Comments
 (0)