diff --git a/rocketpy/AeroSurfaces.py b/rocketpy/AeroSurfaces.py index 34ced8177..2c02da836 100644 --- a/rocketpy/AeroSurfaces.py +++ b/rocketpy/AeroSurfaces.py @@ -641,7 +641,6 @@ def rollInfo(self): return None def airfoilPlots(self): - if self.airfoil is not None: airfoilCl = Function( self.airfoil[0], @@ -1480,7 +1479,6 @@ def geometricInfo(self): return None def aerodynamicInfo(self): - print(f"\nTail name: {self.name}") print(f"Tail Center of Pressure Position in Local Coordinates: {self.cp} m") print(f"Tail Lift Coefficient Slope: {self.clalpha:.3f} 1/rad") diff --git a/rocketpy/EnvironmentAnalysis.py b/rocketpy/EnvironmentAnalysis.py index 0b2a94b1b..5d1550304 100644 --- a/rocketpy/EnvironmentAnalysis.py +++ b/rocketpy/EnvironmentAnalysis.py @@ -637,7 +637,6 @@ def parsePressureLevelData(self): # Loop through time and save all values for timeIndex, timeNum in enumerate(timeNumArray): - dateString, hourString, dateTime = self.__timeNumToDateString( timeNum, timeNumArray.units, calendar="gregorian" ) @@ -820,7 +819,6 @@ def parseSurfaceData(self): # Loop through time and save all values for timeIndex, timeNum in enumerate(timeNumArray): - dateString, hourString, dateTime = self.__timeNumToDateString( timeNum, timeNumArray.units, calendar="gregorian" ) @@ -2138,7 +2136,7 @@ def plot_wind_gust_distribution_over_average_day(self): gs = fig.add_gridspec(nrows, ncols, hspace=0, wspace=0, left=0.12) axs = gs.subplots(sharex=True, sharey=True) x_min, x_max, y_min, y_max = 0, 0, 0, 0 - for (i, j) in [(i, j) for i in range(nrows) for j in range(ncols)]: + for i, j in [(i, j) for i in range(nrows) for j in range(ncols)]: hour = hours[i * ncols + j] ax = axs[i, j] ax.set_title(f"{float(hour):05.2f}".replace(".", ":"), y=0.8) @@ -2300,7 +2298,7 @@ def plot_sustained_surface_wind_speed_distribution_over_average_day( gs = fig.add_gridspec(nrows, ncols, hspace=0, wspace=0, left=0.12) axs = gs.subplots(sharex=True, sharey=True) x_min, x_max, y_min, y_max = 0, 0, 0, 0 - for (i, j) in [(i, j) for i in range(nrows) for j in range(ncols)]: + for i, j in [(i, j) for i in range(nrows) for j in range(ncols)]: hour = hours[i * ncols + j] ax = axs[i, j] ax.set_title(f"{float(hour):05.2f}".replace(".", ":"), y=0.8) @@ -2344,7 +2342,7 @@ def plot_sustained_surface_wind_speed_distribution_over_average_day( ) if windSpeedLimit: - for (i, j) in [(i, j) for i in range(nrows) for j in range(ncols)]: + for i, j in [(i, j) for i in range(nrows) for j in range(ncols)]: # Clear Sky Range Altitude Limits j] ax = axs[i, j] ax.vlines( @@ -2677,7 +2675,7 @@ def plot_wind_profile_over_average_day(self, clear_range_limits=False): gs = fig.add_gridspec(nrows, ncols, hspace=0, wspace=0, left=0.12) axs = gs.subplots(sharex=True, sharey=True) x_min, x_max, y_min, y_max = 0, 0, np.inf, 0 - for (i, j) in [(i, j) for i in range(nrows) for j in range(ncols)]: + for i, j in [(i, j) for i in range(nrows) for j in range(ncols)]: hour = hours[i * ncols + j] ax = axs[i, j] ax.plot(*self.average_wind_profile_at_given_hour[hour], "r-") @@ -2710,7 +2708,7 @@ def plot_wind_profile_over_average_day(self, clear_range_limits=False): ) if clear_range_limits: - for (i, j) in [(i, j) for i in range(nrows) for j in range(ncols)]: + for i, j in [(i, j) for i in range(nrows) for j in range(ncols)]: # Clear Sky Range Altitude Limits ax = axs[i, j] ax.fill_between( @@ -2819,7 +2817,7 @@ def plot_wind_heading_profile_over_average_day(self, clear_range_limits=False): gs = fig.add_gridspec(nrows, ncols, hspace=0, wspace=0, left=0.12) axs = gs.subplots(sharex=True, sharey=True) x_min, x_max, y_min, y_max = 0, 0, np.inf, 0 - for (i, j) in [(i, j) for i in range(nrows) for j in range(ncols)]: + for i, j in [(i, j) for i in range(nrows) for j in range(ncols)]: hour = hours[i * ncols + j] ax = axs[i, j] ax.plot(*self.average_wind_heading_profile_at_given_hour[hour], "r-") @@ -2844,7 +2842,7 @@ def plot_wind_heading_profile_over_average_day(self, clear_range_limits=False): ) if clear_range_limits: - for (i, j) in [(i, j) for i in range(nrows) for j in range(ncols)]: + for i, j in [(i, j) for i in range(nrows) for j in range(ncols)]: # Clear Sky range limits ax = axs[i, j] ax.fill_between( diff --git a/rocketpy/plots/compare/compare.py b/rocketpy/plots/compare/compare.py index d211fb0ca..e3e7daf0a 100644 --- a/rocketpy/plots/compare/compare.py +++ b/rocketpy/plots/compare/compare.py @@ -153,7 +153,6 @@ def create_comparison_figure( raise AttributeError(f"Invalid attribute {y_attributes[i]}.") for i, subplot in enumerate(ax): - # Set the labels for the x and y axis subplot.set_xlabel(x_labels[i]) subplot.set_ylabel(y_labels[i]) diff --git a/rocketpy/plots/compare/compare_flights.py b/rocketpy/plots/compare/compare_flights.py index 36cebf213..29f82e391 100644 --- a/rocketpy/plots/compare/compare_flights.py +++ b/rocketpy/plots/compare/compare_flights.py @@ -1204,7 +1204,6 @@ def compare_trajectories_3d( # Iterate through trajectories for index, flight in enumerate(flights): - x, y, z = flight # Update mx and min values to set the limits of the plot @@ -1383,7 +1382,6 @@ def __plot_xy( # Iterate through trajectories for index, flight in enumerate(flights): - x, y, _ = flight # Update mx and min values to set the limits of the plot @@ -1447,7 +1445,6 @@ def __plot_xz( # Iterate through trajectories for index, flight in enumerate(flights): - x, _, z = flight # Update mx and min values to set the limits of the plot @@ -1514,7 +1511,6 @@ def __plot_yz( # Iterate through trajectories for index, flight in enumerate(flights): - _, y, z = flight # Update mx and min values to set the limits of the plot diff --git a/tests/fixtures/acceptance/EPFL_Bella_Lui/bella_lui_flight_sim.py b/tests/fixtures/acceptance/EPFL_Bella_Lui/bella_lui_flight_sim.py index 5a6b97ea1..8f76951d5 100644 --- a/tests/fixtures/acceptance/EPFL_Bella_Lui/bella_lui_flight_sim.py +++ b/tests/fixtures/acceptance/EPFL_Bella_Lui/bella_lui_flight_sim.py @@ -112,6 +112,7 @@ position=parameters.get("tailDistanceToCM")[0], ) + # Parachute set-up def drogueTrigger(p, y): # p = pressure diff --git a/tests/fixtures/acceptance/NDRT_2020/ndrt_2020_flight_sim.py b/tests/fixtures/acceptance/NDRT_2020/ndrt_2020_flight_sim.py index fefab76ee..ece9545e2 100644 --- a/tests/fixtures/acceptance/NDRT_2020/ndrt_2020_flight_sim.py +++ b/tests/fixtures/acceptance/NDRT_2020/ndrt_2020_flight_sim.py @@ -122,6 +122,7 @@ position=parameters.get("transitiondistanceToCM")[0], ) + # Parachute set-up def drogueTrigger(p, y): # p = pressure diff --git a/tests/test_environment.py b/tests/test_environment.py index 352b5c77b..2b58ccba9 100644 --- a/tests/test_environment.py +++ b/tests/test_environment.py @@ -147,7 +147,6 @@ def test_gefs_atmosphere(mock_show, example_env_robust): @patch("matplotlib.pyplot.show") def test_info_returns(mock_show, example_env): - returned_plots = example_env.allPlotInfoReturned() returned_infos = example_env.allInfoReturned() expected_info = {