Matej Cepl
d60d662a44
typing_extensions package (gh#bokeh/bokeh#11307). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-bokeh?expand=0&rev=42
110 lines
3.8 KiB
Diff
110 lines
3.8 KiB
Diff
---
|
|
bokeh/io/webdriver.py | 3 +--
|
|
bokeh/models/tools.py | 11 +++++------
|
|
bokeh/plotting/_tools.py | 4 +---
|
|
bokeh/util/browser.py | 5 +----
|
|
setup.py | 1 -
|
|
5 files changed, 8 insertions(+), 16 deletions(-)
|
|
|
|
--- a/bokeh/io/webdriver.py
|
|
+++ b/bokeh/io/webdriver.py
|
|
@@ -28,12 +28,11 @@ import atexit
|
|
import os
|
|
from os.path import devnull, dirname, isfile, join
|
|
from shutil import which
|
|
-from typing import List, Optional
|
|
+from typing import List, Literal, Optional
|
|
|
|
# External imports
|
|
from selenium import webdriver
|
|
from selenium.webdriver.remote.webdriver import WebDriver
|
|
-from typing_extensions import Literal
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# Globals and constants
|
|
--- a/bokeh/models/tools.py
|
|
+++ b/bokeh/models/tools.py
|
|
@@ -40,7 +40,6 @@ log = logging.getLogger(__name__)
|
|
# Standard library imports
|
|
import difflib
|
|
import typing as tp
|
|
-from typing_extensions import Literal
|
|
|
|
# Bokeh imports
|
|
from ..core.enums import (
|
|
@@ -287,25 +286,25 @@ class Toolbar(ToolbarBase):
|
|
|
|
'''
|
|
|
|
- active_drag: tp.Union[Literal["auto"], Drag, None] = Either(Null, Auto, Instance(Drag), default="auto", help="""
|
|
+ active_drag: tp.Union[tp.Literal["auto"], Drag, None] = Either(Null, Auto, Instance(Drag), default="auto", help="""
|
|
Specify a drag tool to be active when the plot is displayed.
|
|
""")
|
|
|
|
- active_inspect: tp.Union[Literal["auto"], InspectTool, tp.Sequence[InspectTool], None] = \
|
|
+ active_inspect: tp.Union[tp.Literal["auto"], InspectTool, tp.Sequence[InspectTool], None] = \
|
|
Either(Null, Auto, Instance(InspectTool), Seq(Instance(InspectTool)), default="auto", help="""
|
|
Specify an inspection tool or sequence of inspection tools to be active when
|
|
the plot is displayed.
|
|
""")
|
|
|
|
- active_scroll: tp.Union[Literal["auto"], Scroll, None] = Either(Null, Auto, Instance(Scroll), default="auto", help="""
|
|
+ active_scroll: tp.Union[tp.Literal["auto"], Scroll, None] = Either(Null, Auto, Instance(Scroll), default="auto", help="""
|
|
Specify a scroll/pinch tool to be active when the plot is displayed.
|
|
""")
|
|
|
|
- active_tap: tp.Union[Literal["auto"], Tap, None] = Either(Null, Auto, Instance(Tap), default="auto", help="""
|
|
+ active_tap: tp.Union[tp.Literal["auto"], Tap, None] = Either(Null, Auto, Instance(Tap), default="auto", help="""
|
|
Specify a tap/click tool to be active when the plot is displayed.
|
|
""")
|
|
|
|
- active_multi: tp.Union[Literal["auto"], GestureTool, None] = Nullable(Instance(GestureTool), help="""
|
|
+ active_multi: tp.Union[tp.Literal["auto"], GestureTool, None] = Nullable(Instance(GestureTool), help="""
|
|
Specify an active multi-gesture tool, for instance an edit tool or a range
|
|
tool.
|
|
|
|
--- a/bokeh/plotting/_tools.py
|
|
+++ b/bokeh/plotting/_tools.py
|
|
@@ -24,6 +24,7 @@ from typing import (
|
|
Dict,
|
|
Iterator,
|
|
List,
|
|
+ Literal,
|
|
NamedTuple,
|
|
Optional,
|
|
Sequence,
|
|
@@ -32,9 +33,6 @@ from typing import (
|
|
cast,
|
|
)
|
|
|
|
-# External imports
|
|
-from typing_extensions import Literal
|
|
-
|
|
# Bokeh imports
|
|
from ..models import HoverTool, Plot, Tool, Toolbar
|
|
from ..models.tools import Drag, InspectTool, Scroll, Tap
|
|
--- a/bokeh/util/browser.py
|
|
+++ b/bokeh/util/browser.py
|
|
@@ -21,10 +21,7 @@ log = logging.getLogger(__name__)
|
|
# Standard library imports
|
|
import webbrowser
|
|
from os.path import abspath
|
|
-from typing import Optional, cast
|
|
-
|
|
-# External imports
|
|
-from typing_extensions import Literal, Protocol
|
|
+from typing import Literal, Optional, Protocol, cast
|
|
|
|
# Bokeh imports
|
|
from ..settings import settings
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -92,7 +92,6 @@ REQUIRES = [
|
|
'pillow >=7.1.0',
|
|
'packaging >=16.8',
|
|
'tornado >=5.1',
|
|
- 'typing_extensions >=3.7.4',
|
|
]
|
|
|
|
# if this is just conda-build skimming information, skip all this actual work
|