Skip to content

Commit 680800f

Browse files
authored
fix: specify import exception type and add typing-extensions to deps (#212)
* fix: specify import exception type * fix: specify import error * test: cancel duplicate runs * fix: use different concurrency key * fix: need typing extensions on lower pythons * fix: need typing extensions * fix: try this concurrency * fix: try this concurrency
1 parent e6b1bc6 commit 680800f

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ on:
55
pull_request:
66
branches: [main, devel]
77

8-
concurrency:
9-
group: ${{ github.workflow }}-${{ github.ref }}
10-
cancel-in-progress: true
11-
128
jobs:
139
run-if-changes:
1410
runs-on: ubuntu-latest
@@ -132,6 +128,9 @@ jobs:
132128
matplotlib-version: ${{ fromJson(needs.get-versions.outputs.matplotlib-versions) }}
133129
fail-fast: false
134130
uses: ./.github/workflows/build-ultraplot.yml
131+
concurrency:
132+
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.python-version }}-${{ matrix.matplotlib-version }}
133+
cancel-in-progress: true
135134
with:
136135
python-version: ${{ matrix.python-version }}
137136
matplotlib-version: ${{ matrix.matplotlib-version }}

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ dependencies:
2222
- sphinx-autoapi
2323
- sphinx-automodapi
2424
- sphinx-rtd-theme
25+
- typing-extensions
2526
- basemap >=1.4.1
2627
- pre-commit
2728
- sphinx-design

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ classifiers = [
3333
]
3434
dependencies= [
3535
"numpy>=1.26.0",
36-
"matplotlib>=3.9,<3.10" # bump to 3.11 when basemap is updated
36+
"matplotlib>=3.9,<3.10", # bump to 3.11 when basemap is updated
37+
"typing-extensions; python_version < '3.12'",
3738
]
3839
dynamic = ["version"]
3940

ultraplot/axes/geo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
try:
1010
# From python 3.12
1111
from typing import override
12-
except:
12+
except ImportError:
1313
# From Python 3.5
1414
from typing_extensions import override
1515

ultraplot/figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
try:
1111
from typing import List
12-
except:
12+
except ImportError:
1313
from typing_extensions import List
1414

1515
import matplotlib.axes as maxes

0 commit comments

Comments
 (0)