Skip to content

Commit 103441b

Browse files
committed
Enable pygrep-hooks (PGH) and apply fixes
1 parent 7611b03 commit 103441b

14 files changed

Lines changed: 31 additions & 30 deletions

File tree

holoviews/core/data/__init__.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@
2222
from ..ndmapping import MultiDimensionalMapping
2323
from ..spaces import DynamicMap, HoloMap
2424
from .array import ArrayInterface
25-
from .cudf import cuDFInterface # noqa (API import)
26-
from .dask import DaskInterface # noqa (API import)
27-
from .dictionary import DictInterface # noqa (API import)
28-
from .grid import GridInterface # noqa (API import)
29-
from .ibis import IbisInterface # noqa (API import)
30-
from .image import ImageInterface # noqa (API import)
25+
from .cudf import cuDFInterface # noqa: F401
26+
from .dask import DaskInterface # noqa: F401
27+
from .dictionary import DictInterface # noqa: F401
28+
from .grid import GridInterface # noqa: F401
29+
from .ibis import IbisInterface # noqa: F401
30+
from .image import ImageInterface # noqa: F401
3131
from .interface import Interface, iloc, ndloc
32-
from .multipath import MultiInterface # noqa (API import)
32+
from .multipath import MultiInterface # noqa: F401
3333
from .narwhals import NarwhalsInterface # noqa: F401
34-
from .pandas import PandasAPI, PandasInterface # noqa (API import)
35-
from .spatialpandas import SpatialPandasInterface # noqa (API import)
36-
from .spatialpandas_dask import DaskSpatialPandasInterface # noqa (API import)
37-
from .xarray import XArrayInterface # noqa (API import)
34+
from .pandas import PandasAPI, PandasInterface # noqa: F401
35+
from .spatialpandas import SpatialPandasInterface # noqa: F401
36+
from .spatialpandas_dask import DaskSpatialPandasInterface # noqa: F401
37+
from .xarray import XArrayInterface # noqa: F401
3838

3939
default_datatype = "dataframe"
4040

holoviews/core/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
import param
4747

4848
from ..util.warnings import HoloviewsUserWarning, warn
49-
from .accessors import Opts # noqa (clean up in 2.0)
49+
from .accessors import Opts # noqa: F401 (clean up in 2.0)
5050
from .pprint import InfoPrinter
5151
from .tree import AttrTree
5252
from .util import group_sanitizer, label_sanitizer, sanitize_identifier

holoviews/ipython/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def __call__(self, *args, **params):
9393
super().__call__(*args, **params)
9494
# Abort if IPython not found
9595
try:
96-
ip = params.pop("ip", None) or get_ipython() # noqa (get_ipython)
96+
ip = params.pop("ip", None) or get_ipython() # noqa: F821
9797
except Exception:
9898
return
9999

holoviews/ipython/archive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def get_namespace(self):
8686
raise ImportError("HoloViews does not seem to be imported")
8787
matches = [
8888
k
89-
for k, v in get_ipython().user_ns.items() # noqa (get_ipython)
89+
for k, v in get_ipython().user_ns.items() # noqa: F821
9090
if not k.startswith("_") and v is sys.modules["holoviews"]
9191
]
9292
if len(matches) == 0:

holoviews/operation/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from ..core import Overlay # noqa (API import)
1+
from ..core import Overlay # noqa: F401
22
from ..core.operation import Operation
33
from ..core.options import Compositor
4+
from ..element.util import categorical_aggregate2d
45
from .element import (
56
apply_when,
67
chain,
@@ -21,7 +22,6 @@
2122
threshold,
2223
transform,
2324
)
24-
from ..element.util import categorical_aggregate2d
2525

2626
for _obj in list(locals().values()):
2727
if isinstance(_obj, type) and issubclass(_obj, Operation) and _obj is not Operation:

holoviews/operation/element.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
from ..element.chart import Histogram, Scatter
4848
from ..element.path import Contours, Dendrogram, Polygons
4949
from ..element.raster import RGB, HeatMap, Image
50-
from ..element.util import categorical_aggregate2d # noqa (API import)
50+
from ..element.util import categorical_aggregate2d # noqa: F401
5151
from ..streams import RangeXY
5252
from ..util.locator import MaxNLocator
5353
from ..util.warnings import warn

holoviews/plotting/bokeh/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
VLinesAnnotationPlot,
9090
VSpansAnnotationPlot,
9191
)
92-
from .callbacks import Callback # noqa (API import)
92+
from .callbacks import Callback # noqa: F401
9393
from .chart import (
9494
AreaPlot,
9595
BarPlot,
@@ -109,7 +109,7 @@
109109
from .graphs import ChordPlot, GraphPlot, NodePlot, TriMeshPlot
110110
from .heatmap import HeatMapPlot, RadialHeatMapPlot
111111
from .hex_tiles import HexTilesPlot
112-
from .links import LinkCallback # noqa (API import)
112+
from .links import LinkCallback # noqa: F401
113113
from .path import ContourPlot, DendrogramPlot, PathPlot, PolygonPlot
114114
from .plot import AdjointLayoutPlot, GridPlot, LayoutPlot
115115
from .raster import HSVPlot, ImageStackPlot, QuadMeshPlot, RasterPlot, RGBPlot
@@ -118,7 +118,7 @@
118118
from .stats import BivariatePlot, BoxWhiskerPlot, DistributionPlot, ViolinPlot
119119
from .tabular import TablePlot
120120
from .tiles import TilePlot
121-
from .util import BOKEH_VERSION # noqa (API import)
121+
from .util import BOKEH_VERSION # noqa: F401
122122

123123
Store.renderers["bokeh"] = BokehRenderer.instance()
124124

holoviews/plotting/mpl/plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
rcParams,
1414
)
1515
from matplotlib.font_manager import font_scalings
16-
from mpl_toolkits.mplot3d import Axes3D # noqa (For 3D plots)
16+
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 (For 3D plots)
1717

1818
from ...core import (
1919
AdjointLayout,

holoviews/plotting/plotly/renderer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def plot_options(cls, obj, percent_size):
169169
@classmethod
170170
def load_nb(cls, inline=True):
171171
"""Loads the plotly notebook resources."""
172-
import panel.models.plotly # noqa
172+
import panel.models.plotly # noqa: F401
173173

174174
cls._loaded = True
175175
if "plotly" not in getattr(pn.extension, "_loaded_extensions", ["plotly"]):

holoviews/plotting/renderer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ def load_nb(cls, inline=False, reloading=False, enable_mathjax=False):
742742
load_notebook(inline)
743743
with param.logging_level("ERROR"):
744744
try:
745-
ip = get_ipython() # noqa
745+
ip = get_ipython() # noqa: F821
746746
except Exception:
747747
ip = None
748748
if not ip or not hasattr(ip, "kernel"):

0 commit comments

Comments
 (0)