Skip to content

Commit 85be38a

Browse files
committed
fix static analysis
1 parent a2633c1 commit 85be38a

File tree

14 files changed

+41
-46
lines changed

14 files changed

+41
-46
lines changed

docs/user-guide/imshow.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"id": "394c0bcc-4177-4083-abbb-9f829ab60a01",
5+
"id": "0",
66
"metadata": {},
77
"source": [
88
"# Imshow"
@@ -11,7 +11,7 @@
1111
{
1212
"cell_type": "code",
1313
"execution_count": null,
14-
"id": "7b97da73-c403-48e6-a9a4-d86b8452eca2",
14+
"id": "1",
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
@@ -22,7 +22,7 @@
2222
{
2323
"cell_type": "code",
2424
"execution_count": null,
25-
"id": "650ad4ba-b117-4295-a4d0-55a3df249b1c",
25+
"id": "2",
2626
"metadata": {},
2727
"outputs": [],
2828
"source": [

docs/user-guide/plot.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"id": "d228c316-3700-44b4-b457-218454da891d",
5+
"id": "0",
66
"metadata": {},
77
"source": [
88
"# Plot"
@@ -11,7 +11,7 @@
1111
{
1212
"cell_type": "code",
1313
"execution_count": null,
14-
"id": "710d60a6-0166-44b5-8460-0e46eff525fa",
14+
"id": "1",
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
@@ -22,7 +22,7 @@
2222
{
2323
"cell_type": "code",
2424
"execution_count": null,
25-
"id": "0bcb7406-4eb8-45af-971e-36c7af397de4",
25+
"id": "2",
2626
"metadata": {},
2727
"outputs": [],
2828
"source": [
@@ -42,7 +42,7 @@
4242
{
4343
"cell_type": "code",
4444
"execution_count": null,
45-
"id": "5c0de3de-4ce7-4882-9c0d-db6cb189bce0",
45+
"id": "3",
4646
"metadata": {},
4747
"outputs": [],
4848
"source": [

docs/user-guide/scatter.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"id": "935f17d3-eae3-41e5-8258-8165cda406bb",
5+
"id": "0",
66
"metadata": {},
77
"source": [
88
"# Scatter"
@@ -11,7 +11,7 @@
1111
{
1212
"cell_type": "code",
1313
"execution_count": null,
14-
"id": "9f36776c-0c6b-4d3b-8d76-86961aa11d16",
14+
"id": "1",
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
@@ -22,7 +22,7 @@
2222
{
2323
"cell_type": "code",
2424
"execution_count": null,
25-
"id": "05d54f24-7298-4ec3-befd-85ebaff9d1a6",
25+
"id": "2",
2626
"metadata": {},
2727
"outputs": [],
2828
"source": [

requirements/make_base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ def as_nightly(repo: str) -> str:
7070

7171

7272
nightly = tuple(args.nightly.split(",") if args.nightly else [])
73-
nightly_dependencies = [dep for dep in dependencies + test_dependencies if not dep.startswith(nightly)]
73+
nightly_dependencies = [
74+
dep for dep in dependencies + test_dependencies if not dep.startswith(nightly)
75+
]
7476
nightly_dependencies += [as_nightly(arg) for arg in nightly]
7577

7678
write_dependencies("nightly", nightly_dependencies)

src/matplotgl/axes.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
# Copyright (c) 2023 Matplotgl contributors (https://github.com/matplotgl)
33

44
import ipywidgets as ipw
5+
import numpy as np
56
import pythreejs as p3
67
from matplotlib.axes import Axes as MplAxes
7-
import numpy as np
88

9-
10-
from .line import Line
11-
from .points import Points
129
from .image import Image
10+
from .line import Line
1311
from .mesh import Mesh
12+
from .points import Points
1413
from .utils import latex_to_html
1514
from .widgets import ClickableHTML
1615

src/matplotgl/figure.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22
# Copyright (c) 2023 Matplotgl contributors (https://github.com/matplotgl)
33

4+
from .colorbar import Colorbar
45
from .toolbar import Toolbar
56
from .widgets import HBar
67

7-
from .colorbar import Colorbar
8-
98

109
class Figure(HBar):
1110
def __init__(self, *, figsize=(5.0, 3.5), dpi=96, nrows=1, ncols=1) -> None:
@@ -35,7 +34,8 @@ def toggle_zoom(self, change):
3534
ax._zoom_down_picker.observe(ax.on_mouse_down, names=["point"])
3635
ax._zoom_up_picker.observe(ax.on_mouse_up, names=["point"])
3736
ax._zoom_move_picker.observe(ax.on_mouse_move, names=["point"])
38-
ax.renderer.controls = ax._base_controls + [
37+
ax.renderer.controls = [
38+
*ax._base_controls,
3939
ax._zoom_down_picker,
4040
ax._zoom_up_picker,
4141
ax._zoom_move_picker,

src/matplotgl/image.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22
# Copyright (c) 2023 Matplotgl contributors (https://github.com/matplotgl)
33

4-
import pythreejs as p3
54
import matplotlib as mpl
65
import numpy as np
7-
6+
import pythreejs as p3
87

98
from .norm import Normalizer
109

@@ -13,7 +12,7 @@ class Image:
1312
def __init__(
1413
self,
1514
array: np.ndarray,
16-
extent: list[float] = None,
15+
extent: list[float] | None = None,
1716
cmap: str = "viridis",
1817
zorder: float = 0,
1918
):

src/matplotgl/line.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
# Copyright (c) 2023 Matplotgl contributors (https://github.com/matplotgl)
33

44
import warnings
5-
from matplotlib import colors as mplc
6-
import pythreejs as p3
5+
76
import numpy as np
7+
import pythreejs as p3
8+
from matplotlib import colors as mplc
89

9-
from .utils import fix_empty_range, find_limits
10+
from .utils import find_limits, fix_empty_range
1011

1112

1213
class Line:

src/matplotgl/mesh.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
# Copyright (c) 2023 Matplotgl contributors (https://github.com/matplotgl)
33

44
import warnings
5-
import pythreejs as p3
5+
66
import matplotlib as mpl
77
import numpy as np
8+
import pythreejs as p3
89

9-
from .utils import fix_empty_range, find_limits
10+
from .utils import find_limits, fix_empty_range
1011

1112

1213
class Mesh:

src/matplotgl/points.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
# Copyright (c) 2023 Matplotgl contributors (https://github.com/matplotgl)
33

44
import warnings
5-
import numpy as np
6-
import pythreejs as p3
75

8-
import matplotlib.colors as mplc
96
import matplotlib as mpl
7+
import matplotlib.colors as mplc
8+
import numpy as np
9+
import pythreejs as p3
1010

11-
from .utils import fix_empty_range, find_limits
12-
11+
from .utils import find_limits, fix_empty_range
1312

1413
SHADER_LIBRARY = {
1514
"o": """

0 commit comments

Comments
 (0)