From 055f15d6585bf0dbf1da1de972f87eb92c1ed5ee Mon Sep 17 00:00:00 2001 From: Gui-FernandesBR Date: Thu, 13 Jun 2024 22:50:09 -0300 Subject: [PATCH] MNT: small fixes for pylint --- rocketpy/motors/liquid_motor.py | 6 +----- rocketpy/simulation/flight_data_importer.py | 1 - rocketpy/tools.py | 8 ++++---- tests/unit/test_flight.py | 3 +-- tests/unit/test_rocket.py | 2 +- 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/rocketpy/motors/liquid_motor.py b/rocketpy/motors/liquid_motor.py index 24282e317..3674c33de 100644 --- a/rocketpy/motors/liquid_motor.py +++ b/rocketpy/motors/liquid_motor.py @@ -2,11 +2,7 @@ import numpy as np -from rocketpy.mathutils.function import ( - Function, - funcify_method, - reset_funcified_methods, -) +from rocketpy.mathutils.function import funcify_method, reset_funcified_methods from rocketpy.tools import parallel_axis_theorem_from_com from ..plots.liquid_motor_plots import _LiquidMotorPlots diff --git a/rocketpy/simulation/flight_data_importer.py b/rocketpy/simulation/flight_data_importer.py index 50be87388..b4498a1dc 100644 --- a/rocketpy/simulation/flight_data_importer.py +++ b/rocketpy/simulation/flight_data_importer.py @@ -2,7 +2,6 @@ and build a rocketpy.Flight object from it. """ -import warnings from os import listdir from os.path import isfile, join diff --git a/rocketpy/tools.py b/rocketpy/tools.py index 730067cfd..dd1ff1b52 100644 --- a/rocketpy/tools.py +++ b/rocketpy/tools.py @@ -475,16 +475,16 @@ def create_ellipse_objects(x, y, n, w, h, theta, rgb): return ell_list # Calculate error ellipses for impact and apogee - impactTheta, impactW, impactH = calculate_ellipses(impact_x, impact_y) - apogeeTheta, apogeeW, apogeeH = calculate_ellipses(apogee_x, apogee_y) + impact_theta, impact_w, impact_h = calculate_ellipses(impact_x, impact_y) + apogee_theta, apogee_w, apogee_h = calculate_ellipses(apogee_x, apogee_y) # Draw error ellipses for impact impact_ellipses = create_ellipse_objects( - impact_x, impact_y, 3, impactW, impactH, impactTheta, (0, 0, 1, 0.2) + impact_x, impact_y, 3, impact_w, impact_h, impact_theta, (0, 0, 1, 0.2) ) apogee_ellipses = create_ellipse_objects( - apogee_x, apogee_y, 3, apogeeW, apogeeH, apogeeTheta, (0, 1, 0, 0.2) + apogee_x, apogee_y, 3, apogee_w, apogee_h, apogee_theta, (0, 1, 0, 0.2) ) return impact_ellipses, apogee_ellipses, apogee_x, apogee_y, impact_x, impact_y diff --git a/tests/unit/test_flight.py b/tests/unit/test_flight.py index d44c8fc34..a61ee72ce 100644 --- a/tests/unit/test_flight.py +++ b/tests/unit/test_flight.py @@ -3,10 +3,9 @@ import matplotlib as plt import numpy as np -import pytest from scipy import optimize -from rocketpy import Components, Environment, Flight, Function, Rocket, SolidMotor +from rocketpy import Components plt.rcParams.update({"figure.max_open_warning": 0}) diff --git a/tests/unit/test_rocket.py b/tests/unit/test_rocket.py index b1b44fd2b..82be208c0 100644 --- a/tests/unit/test_rocket.py +++ b/tests/unit/test_rocket.py @@ -3,7 +3,7 @@ import numpy as np import pytest -from rocketpy import Function, NoseCone, Rocket, SolidMotor +from rocketpy import Function, NoseCone, SolidMotor from rocketpy.motors.motor import EmptyMotor, Motor