Skip to content

Commit 40d7555

Browse files
committed
MNT: Remove unused pylint disable statements.
1 parent ba9d130 commit 40d7555

26 files changed

Lines changed: 50 additions & 54 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
@@ -36,6 +36,8 @@ Attention: The newest changes should be on top -->
3636
- ENH: MNT: remove duplicate and merge-sync entries from Unreleased changelog [#1062](https://github.com/RocketPy-Team/RocketPy/pull/1062)
3737
### Changed
3838

39+
- MNT: MNT: Remove Unused pylint Disable Statements. [#1067](https://github.com/RocketPy-Team/RocketPy/pull/1067)
40+
3941
### Fixed
4042

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

rocketpy/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Imported last: utilities pulls in Environment/Rocket/encoders, which are only
2+
# fully available once the imports above have run. Exposes
3+
# ``rocketpy.utilities`` (including ``enable_logging``) on ``import rocketpy``.
4+
from . import utilities
15
from .control import _Controller
26
from .environment import Environment, EnvironmentAnalysis
37
from .exceptions import (
@@ -68,8 +72,3 @@
6872
StochasticTail,
6973
StochasticTrapezoidalFins,
7074
)
71-
72-
# Imported last: utilities pulls in Environment/Rocket/encoders, which are only
73-
# fully available once the imports above have run. Exposes
74-
# ``rocketpy.utilities`` (including ``enable_logging``) on ``import rocketpy``.
75-
from . import utilities

rocketpy/mathutils/function.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2686,7 +2686,7 @@ def __lt__(self, other):
26862686
return ~self.__ge__(other)
26872687

26882688
# Define all possible algebraic operations
2689-
def __add__(self, other): # pylint: disable=too-many-statements
2689+
def __add__(self, other):
26902690
"""Sums a Function object and 'other', returns a new Function
26912691
object which gives the result of the sum.
26922692
@@ -2775,7 +2775,7 @@ def __radd__(self, other):
27752775
"""
27762776
return self + other
27772777

2778-
def __sub__(self, other): # pylint: disable=too-many-statements
2778+
def __sub__(self, other):
27792779
"""Subtracts from a Function object and returns a new Function object
27802780
which gives the result of the subtraction.
27812781
@@ -2867,7 +2867,7 @@ def __rsub__(self, other):
28672867
"""
28682868
return other + (-self)
28692869

2870-
def __mul__(self, other): # pylint: disable=too-many-statements
2870+
def __mul__(self, other):
28712871
"""Multiplies a Function object and returns a new Function object
28722872
which gives the result of the multiplication.
28732873
@@ -3098,7 +3098,7 @@ def __rtruediv__(self, other):
30983098
# pragma: no cover
30993099
raise TypeError("Unsupported type for division")
31003100

3101-
def __pow__(self, other): # pylint: disable=too-many-statements
3101+
def __pow__(self, other):
31023102
"""Raises a Function object to the power of 'other' and
31033103
returns a new Function object which gives the result.
31043104
@@ -3248,7 +3248,7 @@ def __matmul__(self, other):
32483248
"""
32493249
return self.compose(other)
32503250

3251-
def __mod__(self, other): # pylint: disable=too-many-statements
3251+
def __mod__(self, other):
32523252
"""Operator % as an alias for modulo operation."""
32533253
other_is_func = isinstance(other, Function)
32543254
other_is_array = (
@@ -4155,7 +4155,7 @@ def __validate_extrapolation(self, extrapolation):
41554155
extrapolation = "natural"
41564156
return extrapolation
41574157

4158-
def to_dict(self, **kwargs): # pylint: disable=unused-argument
4158+
def to_dict(self, **kwargs):
41594159
"""Serializes the Function instance to a dictionary.
41604160
41614161
Returns
@@ -4338,7 +4338,7 @@ class funcify_method_decorator:
43384338
class.
43394339
"""
43404340

4341-
# pylint: disable=C0103,R0903
4341+
# pylint: disable=C0103
43424342
def __init__(self, func):
43434343
self.func = func
43444344
self.attrname = None
@@ -4370,7 +4370,6 @@ def source_function(*_):
43704370

43714371
source = source_function
43724372
val = Function(source, *args, **kwargs)
4373-
# pylint: disable=W0201
43744373
val.__doc__ = self.__doc__
43754374
val.__cached__ = True
43764375
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

0 commit comments

Comments
 (0)