equinor / webviz-subsurface

Webviz-config plugins for subsurface data.
https://github.com/orgs/equinor/projects/24
GNU General Public License v3.0
56 stars 59 forks source link

Resolve pylint 3.2.0 issues #1292

Open andreas-el opened 4 months ago

andreas-el commented 4 months ago

The most recent version of pylint reports a lot of issues. For the time being I pinned the version to less than < 3.2.0, but ultimately these should be resolved or silenced if deemed safe.

************* Module webviz_subsurface._providers.ensemble_grid_provider.grid_viz_service
webviz_subsurface/_providers/ensemble_grid_provider/grid_viz_service.py:481:0: C0301: Line too long (102/100) (line-too-long)
************* Module webviz_subsurface._providers.ensemble_surface_provider.surface_array_server
webviz_subsurface/_providers/ensemble_surface_provider/surface_array_server.py:239:30: E0606: Possibly using variable 'addr_type_str' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface._providers.ensemble_surface_provider.surface_image_server
webviz_subsurface/_providers/ensemble_surface_provider/surface_image_server.py:236:30: E0606: Possibly using variable 'addr_type_str' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface._datainput.pvt_data
webviz_subsurface/_datainput/pvt_data.py:219:15: E0606: Possibly using variable 'res2df' before assignment (possibly-used-before-assignment)
webviz_subsurface/_datainput/pvt_data.py:225:24: E0606: Possibly using variable 'EclFile' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface._datainput.eclipse_init_io.pvt_gas
webviz_subsurface/_datainput/eclipse_init_io/pvt_gas.py:516:23: E0606: Possibly using variable 'EclFile' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface._datainput.eclipse_init_io.pvt_common
webviz_subsurface/_datainput/eclipse_init_io/pvt_common.py:614:14: E0606: Possibly using variable 'EclFile' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface._datainput.eclipse_init_io.pvt_oil
webviz_subsurface/_datainput/eclipse_init_io/pvt_oil.py:742:23: E0606: Possibly using variable 'EclFile' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface._datainput.eclipse_init_io.pvt_water
webviz_subsurface/_datainput/eclipse_init_io/pvt_water.py:383:23: E0606: Possibly using variable 'EclFile' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._surface_viewer_fmu
webviz_subsurface/plugins/_surface_viewer_fmu.py:739:11: E0606: Possibly using variable 'calculated_surface' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._running_time_analysis_fmu
webviz_subsurface/plugins/_running_time_analysis_fmu.py:626:18: E1123: Unexpected keyword argument 'columns' in method call (unexpected-keyword-arg)
webviz_subsurface/plugins/_running_time_analysis_fmu.py:630:0: I0021: Useless suppression of 'unsubscriptable-object' (useless-suppression)
webviz_subsurface/plugins/_running_time_analysis_fmu.py:653:0: I0021: Useless suppression of 'unsupported-assignment-operation' (useless-suppression)
************* Module webviz_subsurface.plugins._seismic_misfit
webviz_subsurface/plugins/_seismic_misfit.py:2879:21: E0606: Possibly using variable 'cmin' before assignment (possibly-used-before-assignment)
webviz_subsurface/plugins/_seismic_misfit.py:2879:27: E0606: Possibly using variable 'cmax' before assignment (possibly-used-before-assignment)
webviz_subsurface/plugins/_seismic_misfit.py:3369:11: E0606: Possibly using variable 'range_col' before assignment (possibly-used-before-assignment)
webviz_subsurface/plugins/_seismic_misfit.py:3369:22: E0606: Possibly using variable 'scale_midpoint' before assignment (possibly-used-before-assignment)
webviz_subsurface/plugins/_seismic_misfit.py:3369:38: E0606: Possibly using variable 'color_scale' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._reservoir_simulation_timeseries_regional
webviz_subsurface/plugins/_reservoir_simulation_timeseries_regional.py:721:28: E0606: Possibly using variable 'stat_df' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._property_statistics.controllers.property_delta_controller
webviz_subsurface/plugins/_property_statistics/controllers/property_delta_controller.py:86:21: E0606: Possibly using variable 'wrapper' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._line_plotter_fmu.figures.plotly_line_plot
webviz_subsurface/plugins/_line_plotter_fmu/figures/plotly_line_plot.py:250:19: E0606: Possibly using variable 'high' before assignment (possibly-used-before-assignment)
webviz_subsurface/plugins/_line_plotter_fmu/figures/plotly_line_plot.py:250:29: E0606: Possibly using variable 'low' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._tornado_plotter_fmu._plugin
webviz_subsurface/plugins/_tornado_plotter_fmu/_plugin.py:111:24: E0606: Possibly using variable 'ensemble_name' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._well_analysis._views._well_overview_view._utils._well_overview_figure
webviz_subsurface/plugins/_well_analysis/_views/_well_overview_view/_utils/_well_overview_figure.py:120:15: E0606: Possibly using variable 'df_out' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._pvt_plot._views._pvt._view
webviz_subsurface/plugins/_pvt_plot/_views/_pvt/_view.py:217:24: E0606: Possibly using variable 'colors' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._rft_plotter._views._parameter_response_view._view
webviz_subsurface/plugins/_rft_plotter/_views/_parameter_response_view/_view.py:240:60: E0606: Possibly using variable 'corr_title' before assignment (possibly-used-before-assignment)
webviz_subsurface/plugins/_rft_plotter/_views/_parameter_response_view/_view.py:241:31: E0606: Possibly using variable 'highlight_bar' before assignment (possibly-used-before-assignment)
webviz_subsurface/plugins/_rft_plotter/_views/_parameter_response_view/_view.py:250:20: E0606: Possibly using variable 'scatter_y' before assignment (possibly-used-before-assignment)
webviz_subsurface/plugins/_rft_plotter/_views/_parameter_response_view/_view.py:250:31: E0606: Possibly using variable 'scatter_x' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._rft_plotter._views._map_view._utils._map_figure
webviz_subsurface/plugins/_rft_plotter/_views/_map_view/_utils/_map_figure.py:100:31: E0606: Possibly using variable 'df_polygon' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._rft_plotter._utils._rft_plotter_data_model
webviz_subsurface/plugins/_rft_plotter/_utils/_rft_plotter_data_model.py:86:22: E0606: Possibly using variable 'parameterdf' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._structural_uncertainty.controllers.map_controller
webviz_subsurface/plugins/_structural_uncertainty/controllers/map_controller.py:299:57: E0606: Possibly using variable 'wells' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._swatinit_qc._figures
webviz_subsurface/plugins/_swatinit_qc/_figures.py:348:31: E0606: Possibly using variable 'df_polygon' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._grid_viewer_fmu._routes
webviz_subsurface/plugins/_grid_viewer_fmu/_routes.py:20:0: I0021: Useless suppression of 'no-member' (useless-suppression)
webviz_subsurface/plugins/_grid_viewer_fmu/_routes.py:32:0: I0021: Useless suppression of 'no-member' (useless-suppression)
webviz_subsurface/plugins/_grid_viewer_fmu/_routes.py:40:0: I0021: Useless suppression of 'no-member' (useless-suppression)
webviz_subsurface/plugins/_grid_viewer_fmu/_routes.py:52:0: I0021: Useless suppression of 'no-member' (useless-suppression)
webviz_subsurface/plugins/_grid_viewer_fmu/_routes.py:60:0: I0021: Useless suppression of 'no-member' (useless-suppression)
webviz_subsurface/plugins/_grid_viewer_fmu/_routes.py:72:0: I0021: Useless suppression of 'no-member' (useless-suppression)
************* Module webviz_subsurface.plugins._volumetric_analysis.controllers.tornado_controllers
webviz_subsurface/plugins/_volumetric_analysis/controllers/tornado_controllers.py:130:24: E0606: Possibly using variable 'columns' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._volumetric_analysis.controllers.comparison_controllers
webviz_subsurface/plugins/_volumetric_analysis/controllers/comparison_controllers.py:171:60: E0606: Possibly using variable 'diffdf_real' before assignment (possibly-used-before-assignment)
webviz_subsurface/plugins/_volumetric_analysis/controllers/comparison_controllers.py:235:8: E0606: Possibly using variable 'scatter_diff_vs_real' before assignment (possibly-used-before-assignment)
webviz_subsurface/plugins/_volumetric_analysis/controllers/comparison_controllers.py:237:8: E0606: Possibly using variable 'scatter_diff_vs_response' before assignment (possibly-used-before-assignment)
webviz_subsurface/plugins/_volumetric_analysis/controllers/comparison_controllers.py:238:8: E0606: Possibly using variable 'barfig_non_highlighted' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._map_viewer_fmu.layout
webviz_subsurface/plugins/_map_viewer_fmu/layout.py:458:29: E0606: Possibly using variable 'selection_children' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._map_viewer_fmu.callbacks
webviz_subsurface/plugins/_map_viewer_fmu/callbacks.py:756:19: E0606: Possibly using variable 'mode' before assignment (possibly-used-before-assignment)
webviz_subsurface/plugins/_map_viewer_fmu/callbacks.py:777:55: E0606: Possibly using variable 'modes' before assignment (possibly-used-before-assignment)
webviz_subsurface/plugins/_map_viewer_fmu/callbacks.py:851:42: E0606: Possibly using variable 'colormap' before assignment (possibly-used-before-assignment)
webviz_subsurface/plugins/_map_viewer_fmu/callbacks.py:853:33: E0606: Possibly using variable 'color_range' before assignment (possibly-used-before-assignment)
webviz_subsurface/plugins/_map_viewer_fmu/callbacks.py:938:62: E0606: Possibly using variable 'surface' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._prod_misfit.views._well_production_coverage
webviz_subsurface/plugins/_prod_misfit/views/_well_production_coverage.py:283:19: E0606: Possibly using variable 'figures' before assignment (possibly-used-before-assignment)
************* Module webviz_subsurface.plugins._prod_misfit.utils.make_dataframes
webviz_subsurface/plugins/_prod_misfit/utils/make_dataframes.py:264:65: E0606: Possibly using variable 'weight_reduction' before assignment (possibly-used-before-assignment)

-----------------------------------
Your code has been rated at 9.92/10

Error: Pylint returned exit code 18