mirror of
https://github.com/aclist/dztui.git
synced 2026-11-10 20:10:38 +01:00
change: drop Union
This commit is contained in:
1 parent
91d164d666
commit
0729273503
1 file changed
+3
-3
@@ -2,7 +2,7 @@ import re
|
||||
|
||||
from dataclasses import dataclass, fields
|
||||
from operator import attrgetter
|
||||
from typing import TYPE_CHECKING, Union
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from dzgui.const.enum import FilterMode
|
||||
from dzgui.model.model_factory import ModelFactory
|
||||
@@ -216,14 +216,14 @@ class ProxyModelManager:
|
||||
def clear_proxy_model(self) -> None:
|
||||
self.proxy_model.clear()
|
||||
|
||||
def get_proxy_model(self) -> Union["FastInsertListStore", None]:
|
||||
def get_proxy_model(self) -> "FastInsertListStore | None":
|
||||
if hasattr(self, "proxy_model"):
|
||||
return self.proxy_model
|
||||
return None
|
||||
|
||||
def filter(
|
||||
self, mode: FilterMode, skip_cache: bool = False
|
||||
) -> Union["FastInsertListStore", None]:
|
||||
) -> "FastInsertListStore | None":
|
||||
"""
|
||||
Native Gtk.TreeView.refilter() method was not performant enough
|
||||
when running in the main loop with 40k+ records
|
||||
|
||||
Reference in new issue
Block a user