Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 10, 2024
1 parent 61ad70d commit f81e5fe
Show file tree
Hide file tree
Showing 17 changed files with 16 additions and 31 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,4 +254,4 @@ def linkcode_resolve(domain, info):

fn = os.path.relpath(fn, start=os.path.dirname(mpl_inter.__file__))

return f"https://github.com/mpl-extensions/mpl-interactions/blob/main/mpl_interactions/{fn}{linespec}" # noqa: E501
return f"https://github.com/mpl-extensions/mpl-interactions/blob/main/mpl_interactions/{fn}{linespec}"
8 changes: 4 additions & 4 deletions docs/examples/context.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "9bdc7777-5241-4944-a12b-46f05c894dbe",
"id": "0",
"metadata": {},
"source": [
"# Contextmanager for Controls object\n",
Expand All @@ -14,7 +14,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "4c34e1ff-3ef3-4090-a2bd-7dcb3701e58b",
"id": "1",
"metadata": {
"tags": []
},
Expand All @@ -25,7 +25,7 @@
},
{
"cell_type": "markdown",
"id": "28ae4a71-a451-4846-be37-161a42d4a18e",
"id": "2",
"metadata": {},
"source": [
"## Using all params\n",
Expand Down Expand Up @@ -63,7 +63,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "852d736e-2839-4b22-9bd5-1e7b4e35a1d9",
"id": "3",
"metadata": {
"tags": []
},
Expand Down
3 changes: 0 additions & 3 deletions docs/examples/devlop/devlop-base.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"outputs": [],
"source": [
"%matplotlib ipympl\n",
"import ipywidgets as widgets\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
Expand All @@ -27,8 +26,6 @@
},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import xarray as xr\n",
"\n",
"from mpl_interactions import hyperslicer\n",
Expand Down
1 change: 0 additions & 1 deletion docs/examples/devlop/devlop-controller.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@
" also allows [None] to grab None of the current params\n",
" to imply that we only want tau from the existing set of commands\n",
" \"\"\"\n",
"\n",
" # make sure keys is a list\n",
" # bc in gogogo_controls it may get added to another list\n",
" if isinstance(key, str):\n",
Expand Down
2 changes: 0 additions & 2 deletions docs/examples/devlop/devlop-imshow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"outputs": [],
"source": [
"%matplotlib ipympl\n",
"import ipywidgets as widgets\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
Expand All @@ -22,7 +21,6 @@
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"\n",
"parameter1 = np.linspace(-5, 5)\n",
"parameter2 = np.linspace(-5, 5, 25)\n",
Expand Down
1 change: 0 additions & 1 deletion docs/examples/devlop/devlop-scatter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"from IPython.display import display\n",
"from ipywidgets import widgets\n",
"\n",
"x = np.arange(10)\n",
Expand Down
1 change: 1 addition & 0 deletions docs/examples/gallery/heatmap_slicer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
=============
"""

import matplotlib.pyplot as plt
import numpy as np

Expand Down
1 change: 1 addition & 0 deletions docs/examples/gallery/mpl-sliders-same-figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Demonstration of how to provide a matplotlib slider to prevent
the creation of a separate controls figure.
"""

import matplotlib.pyplot as plt
import numpy as np
from matplotlib.widgets import Slider
Expand Down
1 change: 0 additions & 1 deletion docs/examples/heatmap-slicer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"outputs": [],
"source": [
"%matplotlib widget\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"from mpl_interactions import heatmap_slicer"
Expand Down
1 change: 0 additions & 1 deletion docs/examples/hist.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"outputs": [],
"source": [
"%matplotlib ipympl\n",
"import ipywidgets as widgets\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
Expand Down
2 changes: 0 additions & 2 deletions docs/examples/image-segmentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"outputs": [],
"source": [
"%matplotlib ipympl\n",
"import matplotlib.cbook as cbook\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
Expand Down Expand Up @@ -266,7 +265,6 @@
},
"outputs": [],
"source": [
"from ipywidgets import HBox\n",
"\n",
"grayscale_image = image.mean(axis=-1)\n",
"gray = image_segmenter(grayscale_image, nclasses=3, mask=mask, figsize=(5, 5), cmap=\"gray\")\n",
Expand Down
1 change: 0 additions & 1 deletion docs/examples/rossler-attractor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"outputs": [],
"source": [
"%matplotlib ipympl\n",
"from functools import lru_cache\n",
"\n",
"import ipywidgets as widgets\n",
"import matplotlib.pyplot as plt\n",
Expand Down
1 change: 0 additions & 1 deletion docs/examples/scalar-arguments.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
"metadata": {},
"outputs": [],
"source": [
"from mpl_interactions.controller import Controls\n",
"\n",
"# create the controls object\n",
"ctrls = Controls(size=(10, 1000))\n",
Expand Down
2 changes: 0 additions & 2 deletions docs/examples/scatter-selector.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"%matplotlib ipympl\n",
"import pickle\n",
"\n",
"import ipywidgets as widgets\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
Expand All @@ -58,7 +57,6 @@
"metadata": {},
"outputs": [],
"source": [
"import pickle\n",
"\n",
"with open(\"data/stock-metadata.pickle\", \"rb\") as f:\n",
" meta = pickle.load(f)\n",
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/scatter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
"outputs": [],
"source": [
"%matplotlib ipympl\n",
"import ipywidgets as widgets\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import pandas as pd\n",
"from matplotlib.colors import TABLEAU_COLORS, XKCD_COLORS, to_rgba_array\n",
"from matplotlib.colors import TABLEAU_COLORS\n",
"\n",
"import mpl_interactions.ipyplot as iplt"
]
Expand Down
16 changes: 8 additions & 8 deletions docs/examples/text-annotations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "ddddb250-faff-496c-8f0e-6935196ec14a",
"id": "0",
"metadata": {},
"source": [
"# Text and Annotations\n",
Expand All @@ -16,7 +16,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ec2f6996-5f39-4009-a94d-e3a3fda108d9",
"id": "1",
"metadata": {
"tags": []
},
Expand All @@ -31,7 +31,7 @@
},
{
"cell_type": "markdown",
"id": "692989d9-07f1-4969-81d8-fc330f0aa5d4",
"id": "2",
"metadata": {},
"source": [
"## Working with text strings.\n",
Expand All @@ -50,7 +50,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d97390af-872e-42f5-a939-03b734b1cf4f",
"id": "3",
"metadata": {
"tags": []
},
Expand Down Expand Up @@ -84,7 +84,7 @@
},
{
"cell_type": "markdown",
"id": "1e152d5d-6c6f-4e87-b5d6-f6755f4bed17",
"id": "4",
"metadata": {},
"source": [
"## Arbitrarily placed text\n",
Expand All @@ -95,7 +95,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "1ccdd8c4-91fa-440a-9a2d-dbea694ee92d",
"id": "5",
"metadata": {
"tags": []
},
Expand Down Expand Up @@ -125,7 +125,7 @@
},
{
"cell_type": "markdown",
"id": "e2aafbc0-7958-410e-a3b8-ce0a8a75ef30",
"id": "6",
"metadata": {
"jp-MarkdownHeadingCollapsed": true,
"tags": []
Expand All @@ -137,7 +137,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "8eb7da4d-3e48-4b28-85a8-080ff85eee0d",
"id": "7",
"metadata": {
"tags": []
},
Expand Down
1 change: 0 additions & 1 deletion mpl_interactions/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
Matplotlib widgets.
""" # noqa: D205


from collections.abc import Callable
from numbers import Number

Expand Down

0 comments on commit f81e5fe

Please sign in to comment.