Skip to content

Commit be99259

Browse files
authored
MNT: Remove unused pylint disable statements. (#1067)
1 parent 4513b73 commit be99259

24 files changed

Lines changed: 41 additions & 44 deletions

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,6 @@ disable=raw-checker-failed,
476476
locally-disabled,
477477
file-ignored,
478478
suppressed-message,
479-
useless-suppression,
480479
deprecated-pragma, # because we have some pending deprecations in the code.
481480
use-symbolic-message-instead,
482481
use-implicit-booleaness-not-comparison-to-string,
@@ -510,6 +509,7 @@ disable=raw-checker-failed,
510509
# multiple time (only on the command line, not in the configuration file where
511510
# it should appear only once). See also the "--disable" option for examples.
512511
enable=
512+
useless-suppression
513513

514514

515515
[METHOD_ARGS]

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ Attention: The newest changes should be on top -->
3939
- ENH: MNT: remove duplicate and merge-sync entries from Unreleased changelog [#1062](https://github.com/RocketPy-Team/RocketPy/pull/1062)
4040
### Changed
4141

42+
- MNT: MNT: Remove Unused pylint Disable Statements. [#1067](https://github.com/RocketPy-Team/RocketPy/pull/1067)
43+
4244
### Fixed
4345

4446
## [v1.13.0] - 2026-07-04

rocketpy/mathutils/function.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2531,8 +2531,7 @@ def __lt__(self, other):
25312531
return ~self.__ge__(other)
25322532

25332533
# Define all possible algebraic operations
2534-
def __arithmetic_operation(self, other, op):
2535-
# pylint: disable=too-many-statements
2534+
def __arithmetic_operation(self, other, op): # pylint: disable=too-many-statements
25362535
"""Generic handler for arithmetic operations between a Function and
25372536
another operand.
25382537
@@ -3902,7 +3901,7 @@ def __validate_extrapolation(self, extrapolation):
39023901
extrapolation = "natural"
39033902
return extrapolation
39043903

3905-
def to_dict(self, **kwargs): # pylint: disable=unused-argument
3904+
def to_dict(self, **kwargs):
39063905
"""Serializes the Function instance to a dictionary.
39073906
39083907
Returns
@@ -4327,7 +4326,7 @@ class funcify_method_decorator:
43274326
class.
43284327
"""
43294328

4330-
# pylint: disable=C0103,R0903
4329+
# pylint: disable=C0103
43314330
def __init__(self, func):
43324331
self.func = func
43334332
self.attrname = None
@@ -4359,7 +4358,6 @@ def source_function(*_):
43594358

43604359
source = source_function
43614360
val = Function(source, *args, **kwargs)
4362-
# pylint: disable=W0201
43634361
val.__doc__ = self.__doc__
43644362
val.__cached__ = True
43654363
cache[self.attrname] = val

rocketpy/motors/fluid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def __str__(self):
164164

165165
return f"Fluid: {self.name}"
166166

167-
def to_dict(self, **kwargs): # pylint: disable=unused-argument
167+
def to_dict(self, **kwargs):
168168
discretize = kwargs.get("discretize", False)
169169

170170
density = self.density

rocketpy/motors/hybrid_motor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ class HybridMotor(Motor):
198198
Grain length remains constant throughout the burn. Default is True.
199199
"""
200200

201-
# pylint: disable=too-many-arguments
202201
def __init__( # pylint: disable=too-many-arguments
203202
self,
204203
thrust_source,

rocketpy/motors/solid_motor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ def center_of_propellant_mass(self):
483483
center_of_mass = np.full_like(time_source, self.grains_center_of_mass_position)
484484
return np.column_stack((time_source, center_of_mass))
485485

486-
# pylint: disable=too-many-arguments, too-many-statements
486+
# pylint: disable=too-many-statements
487487
def evaluate_geometry(self):
488488
"""Calculates grain inner radius and grain height as a function of time
489489
by assuming that every propellant mass burnt is exhausted. In order to

rocketpy/plots/compare/compare_flights.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# TODO: needs to refactor this class to use the show_or_save_plot
1414

1515

16-
class CompareFlights(Compare): # pylint: disable=too-many-public-methods
16+
class CompareFlights(Compare):
1717
"""A class to compare the results of multiple flights.
1818
1919
Parameters
@@ -1343,7 +1343,7 @@ def trajectories_2d(self, plane="xy", figsize=(7, 7), legend=None, filename=None
13431343

13441344
func(flights, names_list, figsize, legend, filename)
13451345

1346-
def __plot_xy( # pylint: disable=too-many-statements
1346+
def __plot_xy(
13471347
self, flights, names_list, figsize=(7, 7), legend=None, filename=None
13481348
):
13491349
"""Creates a 2D trajectory plot in the X-Y plane that is the combination
@@ -1404,7 +1404,7 @@ def __plot_xy( # pylint: disable=too-many-statements
14041404
# Save figure
14051405
self.__process_savefig(filename, fig)
14061406

1407-
def __plot_xz( # pylint: disable=too-many-statements
1407+
def __plot_xz(
14081408
self, flights, names_list, figsize=(7, 7), legend=None, filename=None
14091409
):
14101410
"""Creates a 2D trajectory plot in the X-Z plane that is the combination
@@ -1470,7 +1470,7 @@ def __plot_xz( # pylint: disable=too-many-statements
14701470
# Save figure
14711471
show_or_save_plot(filename)
14721472

1473-
def __plot_yz( # pylint: disable=too-many-statements
1473+
def __plot_yz(
14741474
self, flights, names_list, figsize=(7, 7), legend=None, filename=None
14751475
):
14761476
"""Creates a 2D trajectory plot in the Y-Z plane that is the combination

rocketpy/plots/environment_analysis_plots.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def average_surface_temperature_evolution(
194194
self,
195195
*,
196196
filename=None,
197-
): # pylint: disable=too-many-statements
197+
):
198198
"""Plots average temperature progression throughout the day, including
199199
sigma contours.
200200
@@ -269,7 +269,7 @@ def average_surface_temperature_evolution(
269269

270270
def average_surface10m_wind_speed_evolution(
271271
self, wind_speed_limit=False, *, filename=None
272-
): # pylint: disable=too-many-statements
272+
):
273273
"""Plots average surface wind speed progression throughout the day,
274274
including sigma contours.
275275
@@ -371,7 +371,7 @@ def average_surface100m_wind_speed_evolution(
371371
self,
372372
*,
373373
filename=None,
374-
): # pylint: disable=too-many-statements
374+
):
375375
"""Plots average surface wind speed progression throughout the day, including
376376
sigma contours.
377377
@@ -957,7 +957,7 @@ def average_wind_rose_specific_hour(self, hour, fig=None, *, filename=None):
957957
)
958958
show_or_save_plot(filename)
959959

960-
def average_wind_rose_grid(self, *, filename=None): # pylint: disable=too-many-statements
960+
def average_wind_rose_grid(self, *, filename=None):
961961
"""Plot wind roses for all hours of a day, in a grid like plot.
962962
963963
Parameters
@@ -1683,7 +1683,7 @@ def wind_heading_profile_grid(self, clear_range_limits=False, *, filename=None):
16831683
fig.supylabel(f"Altitude AGL ({self.env_analysis.unit_system['length']})")
16841684
show_or_save_plot(filename)
16851685

1686-
def animate_wind_speed_profile(self, clear_range_limits=False): # pylint: disable=too-many-statements
1686+
def animate_wind_speed_profile(self, clear_range_limits=False):
16871687
"""Animation of how wind profile evolves throughout an average day.
16881688
16891689
Parameters
@@ -1763,7 +1763,7 @@ def update(frame):
17631763
plt.close(fig)
17641764
return HTML(animation.to_jshtml())
17651765

1766-
def animate_wind_heading_profile(self, clear_range_limits=False): # pylint: disable=too-many-statements
1766+
def animate_wind_heading_profile(self, clear_range_limits=False):
17671767
"""Animation of how the wind heading profile evolves throughout an
17681768
average day. Each frame is a different hour of the day.
17691769

rocketpy/rocket/aero_surface/fins/_geometry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def evaluate_geometrical_parameters(self):
142142
"roll_geometrical_constant": roll_geometrical_constant,
143143
"tau": tau,
144144
"lift_interference_factor": lift_interference_factor,
145-
"λ": lambda_, # pylint: disable=non-ascii-name
145+
"λ": lambda_,
146146
"roll_damping_interference_factor": roll_damping_interference_factor,
147147
"roll_forcing_interference_factor": roll_forcing_interference_factor,
148148
}
@@ -204,7 +204,7 @@ def get_data(self, include_outputs=False):
204204
class _EllipticalGeometry(_FinGeometry):
205205
"""Geometry strategy for elliptical fins."""
206206

207-
def evaluate_geometrical_parameters(self): # pylint: disable=too-many-statements
207+
def evaluate_geometrical_parameters(self):
208208
"""Calculate elliptical fin geometric parameters."""
209209
owner = self.owner
210210

rocketpy/rocket/aero_surface/generic_surface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def _process_input(self, input_data, coeff_name):
382382
" or a callable."
383383
)
384384

385-
def __load_generic_surface_csv(self, file_path, coeff_name): # pylint: disable=too-many-statements,import-outside-toplevel
385+
def __load_generic_surface_csv(self, file_path, coeff_name): # pylint: disable=too-many-statements
386386
"""Load GenericSurface coefficient CSV into a 7D Function.
387387
388388
This loader expects header-based CSV data with one or more independent

0 commit comments

Comments
 (0)