Skip to content

Commit 941cb5b

Browse files
committed
use typing extensions for literal
1 parent 8d3eb48 commit 941cb5b

File tree

10 files changed

+18
-9
lines changed

10 files changed

+18
-9
lines changed

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ schema
1818
jsonschema
1919
scipy >= 1.1
2020
sympy
21+
typing_extensions
2122
watchdog

src/compas_plotters/artists/circleartist.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from typing import Literal, Tuple, List
1+
from typing import Tuple, List
2+
from typing_extensions import Literal
23
from matplotlib.patches import Circle as CirclePatch
34
from compas.geometry import Circle
45
from compas_plotters.artists import Artist

src/compas_plotters/artists/ellipseartist.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from typing import Literal, Tuple, List
1+
from typing import Tuple, List
2+
from typing_extensions import Literal
23
from matplotlib.patches import Ellipse as EllipsePatch
34
from compas.geometry import Ellipse
45
from compas_plotters.artists import Artist

src/compas_plotters/artists/lineartist.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from typing import Literal, Tuple, List
1+
from typing import Tuple, List
2+
from typing_extensions import Literal
23
from matplotlib.lines import Line2D
34
from compas.geometry import Point, Line
45
from compas.geometry import intersection_line_box_xy

src/compas_plotters/artists/meshartist.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from typing import Dict, Literal, Tuple, List, Union
1+
from typing import Dict, Tuple, List, Union
2+
from typing_extensions import Literal
23
from matplotlib.collections import LineCollection, PatchCollection
34
from matplotlib.patches import Polygon as PolygonPatch
45
from matplotlib.patches import Circle

src/compas_plotters/artists/networkartist.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from typing import Dict, Literal, Tuple, List, Union
1+
from typing import Dict, Tuple, List, Union
2+
from typing_extensions import Literal
23
from matplotlib.collections import LineCollection, PatchCollection
34
from matplotlib.patches import Circle
45
from compas.datastructures import Network

src/compas_plotters/artists/polygonartist.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from typing import Literal, Tuple, List
1+
from typing import Tuple, List
2+
from typing_extensions import Literal
23
from matplotlib.patches import Polygon as PolygonPatch
34
from compas.geometry import Polygon
45
from compas_plotters.artists import Artist

src/compas_plotters/artists/polylineartist.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from typing import Literal, Tuple, List
1+
from typing import Tuple, List
2+
from typing_extensions import Literal
23
from matplotlib.lines import Line2D
34
from compas.geometry import Polyline
45
from compas_plotters.artists import Artist

src/compas_plotters/artists/segmentartist.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from typing import Literal, Tuple, List
1+
from typing import Tuple, List
2+
from typing_extensions import Literal
23
from matplotlib.lines import Line2D
34
from compas.geometry import Line
45
from compas_plotters.artists import Artist

src/compas_plotters/plotter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Plotter:
1616
----------
1717
view : tuple, optional
1818
The area of the axes that should be zoomed into view.
19-
DEfault is ``([-10, 10], [-3, 10])``.
19+
Default is ``([-10, 10], [-3, 10])``.
2020
figsize : tuple, optional
2121
The size of the figure in inches.
2222
Default is ``(8, 5)``

0 commit comments

Comments
 (0)