Skip to content

Commit 42a18a1

Browse files
authored
pylint and mypy fixes (#1325)
1 parent 83ff4a2 commit 42a18a1

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"console_scripts": ["smry2arrow_batch=webviz_subsurface.smry2arrow_batch:main"],
8888
},
8989
install_requires=[
90-
"dash>=2.0.0",
90+
"dash>=2.0.0,<3",
9191
"dash_bootstrap_components>=0.10.3",
9292
"dash-daq>=0.5.0",
9393
"defusedxml>=0.6.0",

webviz_subsurface/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import jsonschema
66
import webviz_config
77
import yaml
8-
from pkg_resources import DistributionNotFound, get_distribution
8+
from pkg_resources import DistributionNotFound, get_distribution # type: ignore
99

1010
from webviz_subsurface._utils.user_defined_vector_definitions import (
1111
USER_DEFINED_VECTOR_DEFINITIONS_JSON_SCHEMA,

webviz_subsurface/_components/color_picker.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def _show_color_picker(
171171
if not cell:
172172
raise PreventUpdate
173173
row_no = cell["row"]
174-
return dash_daq.ColorPicker( # pylint: disable=not-callable
174+
return dash_daq.ColorPicker(
175175
{"id": self._uuid, "element": "picker"},
176176
label=f"Color for {[col for col in self._dframe.iloc[row_no] if col != 'COLOR']}",
177177
value={"hex": current_color_store[row_no]},

webviz_subsurface/plugins/_co2_leakage/_utilities/co2volume.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def _prepare_pattern_and_color_options_statistics_plot(
228228

229229

230230
def _find_default_option_statistics_figure(
231-
df: pd.DataFrame, categories: list[str]
231+
df: pd.DataFrame, categories: List[str]
232232
) -> str:
233233
if "hazardous" in categories:
234234
default_option = "hazardous"
@@ -611,7 +611,7 @@ def _add_hover_info_in_field(
611611
p15 = prev_val + 0.15 * amount
612612
p85 = prev_val + 0.85 * amount
613613
y_vals = np.linspace(p15, p85, 8).tolist() * len(date_dict[date])
614-
y_vals.sort()
614+
y_vals.sort() # type: ignore[attr-defined]
615615
fig.add_trace(
616616
go.Scatter(
617617
x=date_dict[date] * 8,

0 commit comments

Comments
 (0)