Skip to content

Commit 5db75b5

Browse files
make lint
1 parent fc90b49 commit 5db75b5

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

tests/fixtures/controller/controller_fixtures.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,24 +65,24 @@ def controller_function( # pylint: disable=unused-argument
6565
environment,
6666
):
6767
# state = [x, y, z, vx, vy, vz, e0, e1, e2, e3, wx, wy, wz]
68-
altitude_ASL = state[2] # altitude above sea level
69-
altitude_AGL = (
70-
altitude_ASL - environment.elevation
68+
altitude_asl = state[2] # altitude above sea level
69+
altitude_agl = (
70+
altitude_asl - environment.elevation
7171
) # altitude above ground level
7272
vx, vy, vz = state[3], state[4], state[5]
7373

7474
# Use environment parameter instead of global variable
75-
wind_x = environment.wind_velocity_x(altitude_ASL)
76-
wind_y = environment.wind_velocity_y(altitude_ASL)
75+
wind_x = environment.wind_velocity_x(altitude_asl)
76+
wind_y = environment.wind_velocity_y(altitude_asl)
7777

7878
# Calculate Mach number using environment data
7979
free_stream_speed = ((wind_x - vx) ** 2 + (wind_y - vy) ** 2 + (vz) ** 2) ** 0.5
80-
mach_number = free_stream_speed / environment.speed_of_sound(altitude_ASL)
80+
mach_number = free_stream_speed / environment.speed_of_sound(altitude_asl)
8181

8282
if time < 3.9:
8383
return None
8484

85-
if altitude_AGL < 1500:
85+
if altitude_agl < 1500:
8686
air_brakes.deployment_level = 0
8787
else:
8888
previous_vz = state_history[-1][5] if state_history else vz

tests/integration/simulation/test_flight.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ def test_7_parameter_controller_with_sensors(calisto_robust, example_plain_env):
617617
"""
618618

619619
# Define a 7-parameter controller
620-
def controller_7_params(
620+
def controller_7_params( # pylint: disable=unused-argument
621621
time,
622622
sampling_rate,
623623
state,
@@ -675,14 +675,14 @@ def test_invalid_controller_parameter_count(calisto_robust):
675675
"""
676676

677677
# Define controller with wrong number of parameters (5)
678-
def invalid_controller_5_params(
678+
def invalid_controller_5_params( # pylint: disable=unused-argument
679679
time, sampling_rate, state, state_history, observed_variables
680680
):
681681
"""Invalid controller with only 5 parameters."""
682682
return None
683683

684684
# Define controller with wrong number of parameters (9)
685-
def invalid_controller_9_params(
685+
def invalid_controller_9_params( # pylint: disable=unused-argument
686686
time,
687687
sampling_rate,
688688
state,
@@ -742,7 +742,7 @@ def test_environment_methods_accessible_in_controller(
742742
"temperature": False,
743743
}
744744

745-
def controller_test_environment_access(
745+
def controller_test_environment_access( # pylint: disable=unused-argument
746746
time,
747747
sampling_rate,
748748
state,
@@ -753,7 +753,7 @@ def controller_test_environment_access(
753753
environment,
754754
):
755755
"""Controller that tests access to various environment methods."""
756-
altitude_ASL = state[2]
756+
altitude_asl = state[2]
757757

758758
if time < 3.9:
759759
return None
@@ -763,25 +763,25 @@ def controller_test_environment_access(
763763
_ = environment.elevation
764764
methods_called["elevation"] = True
765765

766-
_ = environment.wind_velocity_x(altitude_ASL)
766+
_ = environment.wind_velocity_x(altitude_asl)
767767
methods_called["wind_velocity_x"] = True
768768

769-
_ = environment.wind_velocity_y(altitude_ASL)
769+
_ = environment.wind_velocity_y(altitude_asl)
770770
methods_called["wind_velocity_y"] = True
771771

772-
_ = environment.speed_of_sound(altitude_ASL)
772+
_ = environment.speed_of_sound(altitude_asl)
773773
methods_called["speed_of_sound"] = True
774774

775-
_ = environment.pressure(altitude_ASL)
775+
_ = environment.pressure(altitude_asl)
776776
methods_called["pressure"] = True
777777

778-
_ = environment.temperature(altitude_ASL)
778+
_ = environment.temperature(altitude_asl)
779779
methods_called["temperature"] = True
780780

781781
air_brakes.deployment_level = 0.3
782782
except AttributeError as e:
783783
# If any method is not accessible, the test should fail
784-
raise AssertionError(f"Environment method not accessible: {e}")
784+
raise AssertionError(f"Environment method not accessible: {e}") from e
785785

786786
return (time, air_brakes.deployment_level)
787787

0 commit comments

Comments
 (0)