Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,6 @@ disable=raw-checker-failed,
locally-disabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma, # because we have some pending deprecations in the code.
use-symbolic-message-instead,
use-implicit-booleaness-not-comparison-to-string,
Expand Down Expand Up @@ -510,6 +509,7 @@ disable=raw-checker-failed,
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
enable=
useless-suppression


[METHOD_ARGS]
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Attention: The newest changes should be on top -->
- ENH: MNT: remove duplicate and merge-sync entries from Unreleased changelog [#1062](https://github.com/RocketPy-Team/RocketPy/pull/1062)
### Changed

- MNT: MNT: Remove Unused pylint Disable Statements. [#1067](https://github.com/RocketPy-Team/RocketPy/pull/1067)

### Fixed

## [v1.13.0] - 2026-07-04
Expand Down
8 changes: 3 additions & 5 deletions rocketpy/mathutils/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -2531,8 +2531,7 @@ def __lt__(self, other):
return ~self.__ge__(other)

# Define all possible algebraic operations
def __arithmetic_operation(self, other, op):
# pylint: disable=too-many-statements
def __arithmetic_operation(self, other, op): # pylint: disable=too-many-statements
"""Generic handler for arithmetic operations between a Function and
another operand.

Expand Down Expand Up @@ -3902,7 +3901,7 @@ def __validate_extrapolation(self, extrapolation):
extrapolation = "natural"
return extrapolation

def to_dict(self, **kwargs): # pylint: disable=unused-argument
def to_dict(self, **kwargs):
"""Serializes the Function instance to a dictionary.

Returns
Expand Down Expand Up @@ -4327,7 +4326,7 @@ class funcify_method_decorator:
class.
"""

# pylint: disable=C0103,R0903
# pylint: disable=C0103
def __init__(self, func):
self.func = func
self.attrname = None
Expand Down Expand Up @@ -4359,7 +4358,6 @@ def source_function(*_):

source = source_function
val = Function(source, *args, **kwargs)
# pylint: disable=W0201
val.__doc__ = self.__doc__
val.__cached__ = True
cache[self.attrname] = val
Expand Down
2 changes: 1 addition & 1 deletion rocketpy/motors/fluid.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def __str__(self):

return f"Fluid: {self.name}"

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

density = self.density
Expand Down
1 change: 0 additions & 1 deletion rocketpy/motors/hybrid_motor.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ class HybridMotor(Motor):
Grain length remains constant throughout the burn. Default is True.
"""

# pylint: disable=too-many-arguments
def __init__( # pylint: disable=too-many-arguments
self,
thrust_source,
Expand Down
2 changes: 1 addition & 1 deletion rocketpy/motors/solid_motor.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def center_of_propellant_mass(self):
center_of_mass = np.full_like(time_source, self.grains_center_of_mass_position)
return np.column_stack((time_source, center_of_mass))

# pylint: disable=too-many-arguments, too-many-statements
# pylint: disable=too-many-statements
def evaluate_geometry(self):
"""Calculates grain inner radius and grain height as a function of time
by assuming that every propellant mass burnt is exhausted. In order to
Expand Down
8 changes: 4 additions & 4 deletions rocketpy/plots/compare/compare_flights.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# TODO: needs to refactor this class to use the show_or_save_plot


class CompareFlights(Compare): # pylint: disable=too-many-public-methods
class CompareFlights(Compare):
"""A class to compare the results of multiple flights.

Parameters
Expand Down Expand Up @@ -1343,7 +1343,7 @@ def trajectories_2d(self, plane="xy", figsize=(7, 7), legend=None, filename=None

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

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

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

def __plot_yz( # pylint: disable=too-many-statements
def __plot_yz(
self, flights, names_list, figsize=(7, 7), legend=None, filename=None
):
"""Creates a 2D trajectory plot in the Y-Z plane that is the combination
Expand Down
12 changes: 6 additions & 6 deletions rocketpy/plots/environment_analysis_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def average_surface_temperature_evolution(
self,
*,
filename=None,
): # pylint: disable=too-many-statements
):
"""Plots average temperature progression throughout the day, including
sigma contours.

Expand Down Expand Up @@ -269,7 +269,7 @@ def average_surface_temperature_evolution(

def average_surface10m_wind_speed_evolution(
self, wind_speed_limit=False, *, filename=None
): # pylint: disable=too-many-statements
):
"""Plots average surface wind speed progression throughout the day,
including sigma contours.

Expand Down Expand Up @@ -371,7 +371,7 @@ def average_surface100m_wind_speed_evolution(
self,
*,
filename=None,
): # pylint: disable=too-many-statements
):
"""Plots average surface wind speed progression throughout the day, including
sigma contours.

Expand Down Expand Up @@ -957,7 +957,7 @@ def average_wind_rose_specific_hour(self, hour, fig=None, *, filename=None):
)
show_or_save_plot(filename)

def average_wind_rose_grid(self, *, filename=None): # pylint: disable=too-many-statements
def average_wind_rose_grid(self, *, filename=None):
"""Plot wind roses for all hours of a day, in a grid like plot.

Parameters
Expand Down Expand Up @@ -1683,7 +1683,7 @@ def wind_heading_profile_grid(self, clear_range_limits=False, *, filename=None):
fig.supylabel(f"Altitude AGL ({self.env_analysis.unit_system['length']})")
show_or_save_plot(filename)

def animate_wind_speed_profile(self, clear_range_limits=False): # pylint: disable=too-many-statements
def animate_wind_speed_profile(self, clear_range_limits=False):
"""Animation of how wind profile evolves throughout an average day.

Parameters
Expand Down Expand Up @@ -1763,7 +1763,7 @@ def update(frame):
plt.close(fig)
return HTML(animation.to_jshtml())

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

Expand Down
4 changes: 2 additions & 2 deletions rocketpy/rocket/aero_surface/fins/_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def evaluate_geometrical_parameters(self):
"roll_geometrical_constant": roll_geometrical_constant,
"tau": tau,
"lift_interference_factor": lift_interference_factor,
"λ": lambda_, # pylint: disable=non-ascii-name
"λ": lambda_,
"roll_damping_interference_factor": roll_damping_interference_factor,
"roll_forcing_interference_factor": roll_forcing_interference_factor,
}
Expand Down Expand Up @@ -204,7 +204,7 @@ def get_data(self, include_outputs=False):
class _EllipticalGeometry(_FinGeometry):
"""Geometry strategy for elliptical fins."""

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

Expand Down
2 changes: 1 addition & 1 deletion rocketpy/rocket/aero_surface/generic_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def _process_input(self, input_data, coeff_name):
" or a callable."
)

def __load_generic_surface_csv(self, file_path, coeff_name): # pylint: disable=too-many-statements,import-outside-toplevel
def __load_generic_surface_csv(self, file_path, coeff_name): # pylint: disable=too-many-statements
"""Load GenericSurface coefficient CSV into a 7D Function.

This loader expects header-based CSV data with one or more independent
Expand Down
6 changes: 3 additions & 3 deletions rocketpy/rocket/aero_surface/nose_cone.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class NoseCone(AeroSurface):
more about it.
"""

def __init__( # pylint: disable=too-many-statements
def __init__(
self,
length,
kind,
Expand Down Expand Up @@ -222,7 +222,7 @@ def kind(self):
return self._kind

@kind.setter
def kind(self, value): # pylint: disable=too-many-statements
def kind(self, value):
# Analyzes nosecone type
# Sets the k for Cp calculation
# Sets the function which creates the respective curve
Expand Down Expand Up @@ -373,7 +373,7 @@ def evaluate_geometrical_parameters(self):

self.fineness_ratio = self.length / (2 * self.base_radius)

def evaluate_nose_shape(self): # pylint: disable=too-many-statements
def evaluate_nose_shape(self):
"""Calculates and saves nose cone's shape as lists and re-evaluates the
nose cone's length for a given bluffness ratio. The shape is saved as
two vectors, one for the x coordinates and one for the y coordinates.
Expand Down
2 changes: 1 addition & 1 deletion rocketpy/rocket/parachute.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,9 @@ def __evaluate_trigger_function(self, trigger): # pylint: disable=too-many-stat
The resulting triggerfunc always has signature (p, h, y, sensors, u_dot)
so Flight can pass both sensors and u_dot when needed.
"""
# pylint: disable=function-redefined
self._trigger_falling_only = False
self._trigger_needs_height = True
# pylint: disable=unused-argument, function-redefined

# Helper to wrap any callable to the internal (p, h, y, sensors, u_dot) API
def _make_wrapper(fn):
Expand Down
2 changes: 1 addition & 1 deletion rocketpy/rocket/rocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -2453,7 +2453,7 @@ def _count_positional_args(callable_obj):
"Function, or callable."
)

def __load_rocket_drag_csv(self, file_path, coeff_name): # pylint: disable=too-many-statements,import-outside-toplevel
def __load_rocket_drag_csv(self, file_path, coeff_name): # pylint: disable=too-many-statements
"""Load Rocket drag CSV into a 7D Function.

Supports either headerless two-column (mach, coefficient) tables or
Expand Down
2 changes: 1 addition & 1 deletion rocketpy/simulation/flight.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ def __repr__(self):
f"name= {self.name})>"
)

# pylint: disable=too-many-nested-blocks, too-many-branches, too-many-locals,too-many-statements
# pylint: disable=too-many-locals,too-many-statements
def __simulate(self, verbose):
"""Simulate the flight trajectory."""
for phase_index, phase in self.time_iterator(self.flight_phases):
Expand Down
4 changes: 2 additions & 2 deletions rocketpy/simulation/flight_comparator.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def _finalize_compare_figure(
if filename:
print(f"Plot saved to file: {filename}")

def compare( # pylint: disable=too-many-statements
def compare(
self,
attribute,
time_range=None,
Expand Down Expand Up @@ -730,7 +730,7 @@ def _format_key_events_table(self, results):

return "\n".join(lines)

def summary(self): # pylint: disable=too-many-statements
def summary(self):
"""
Print comprehensive comparison summary including key events and metrics.

Expand Down
2 changes: 1 addition & 1 deletion rocketpy/simulation/flight_data_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def export_pressures(self, file_name, time_step):
"""
f = self._flight
time_points = np.arange(0, f.t_final, time_step)
# pylint: disable=W1514, E1121
# pylint: disable=W1514
with open(file_name, "w") as file:
if len(f.rocket.parachutes) == 0:
logger.info("No parachutes in the rocket, saving static pressure.")
Expand Down
4 changes: 2 additions & 2 deletions rocketpy/simulation/monte_carlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def __init__(
flight,
export_list=None,
data_collector=None,
): # pylint: disable=too-many-statements
):
"""
Initialize a MonteCarlo object.

Expand Down Expand Up @@ -171,7 +171,7 @@ def simulate(
parallel=False,
n_workers=None,
**kwargs,
): # pylint: disable=too-many-statements
):
"""
Runs the Monte Carlo simulation and saves all data.

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/simulation/test_monte_carlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def test_monte_carlo_prints(monte_carlo_calisto):
_post_test_file_cleanup()


@patch("matplotlib.pyplot.show") # pylint: disable=unused-argument
@patch("matplotlib.pyplot.show")
def test_monte_carlo_plots(mock_show, monte_carlo_calisto_pre_loaded):
"""Tests the plots methods of the MonteCarlo class."""
try:
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def test_flight_save_load_resimulate(flight_name, include_outputs, request):

assert np.isclose(flight_to_save.t_initial, flight_loaded.t_initial)
assert np.isclose(flight_to_save.out_of_rail_time, flight_loaded.out_of_rail_time)
assert np.isclose(flight_to_save.apogee_time, flight_loaded.apogee_time)
assert np.isclose(flight_to_save.apogee_time, flight_loaded.apogee_time, rtol=1e-4)

# Higher tolerance due to random parachute trigger
assert np.isclose(flight_to_save.t_final, flight_loaded.t_final, rtol=5e-3)
Expand Down
1 change: 0 additions & 1 deletion tests/unit/environment/test_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,6 @@ def test_pressure_conversion_factor_autodetect_by_model(
"""Regression test for the GEFS/HIRESW pressure-unit bug: NOMADS-GrADS
models report pressure in hPa (factor 100), THREDDS models in Pa (factor 1).
A wrong factor silently corrupts the whole atmospheric profile (100x)."""
# pylint: disable=protected-access
factor = example_plain_env._Environment__determine_pressure_conversion_factor(
None, None, model
)
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/mathutils/test_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ def test_set_discrete_based_on_model_non_mutator(linear_func):
(source_array, cropped_array),
],
)
def test_crop_ndarray(array3dsource, array3dcropped): # pylint: disable=unused-argument
def test_crop_ndarray(array3dsource, array3dcropped):
"""Tests the functionality of crop method of the Function class.
The source is initialized as a ndarray before cropping.
"""
Expand Down Expand Up @@ -795,7 +795,7 @@ def test_crop_invalid_input_raises(bad_x_lim, exc_type):
(source_array, clipped_array),
],
)
def test_clip_ndarray(array3dsource, array3dclipped): # pylint: disable=unused-argument
def test_clip_ndarray(array3dsource, array3dclipped):
"""Tests the functionality of clip method of the Function class.
The source is initialized as a ndarray before clipping.
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/simulation/test_monte_carlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def import_outputs(self, *args, **kwargs): # no-op, avoids file I/O
pass

def simulate(self, number_of_simulations, append=True, **kwargs):
# pylint: disable=arguments-differ,unused-argument
# pylint: disable=arguments-differ
self.simulate_calls += 1
self.num_of_loaded_sims = number_of_simulations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from rocketpy._encoders import RocketPyEncoder


# pylint: disable=too-many-statements
def test_mrs_initialization():
"""Tests if the MultivariateRejectionSampler initialization opens input and output
files correctly, and if it raises errors correctly when the files are problematic.
Expand Down
Loading
Loading