Skip to content

Commit 556441e

Browse files
committed
Merge branch 'develop' of https://github.com/peterdsharpe/AeroSandbox into develop
2 parents a373497 + 22b05aa commit 556441e

File tree

18 files changed

+38
-43
lines changed

18 files changed

+38
-43
lines changed

aerosandbox/aerodynamics/aero_3D/aero_buildup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
softmax_scalefree,
1212
)
1313
from dataclasses import dataclass
14+
from typing import Literal
1415

1516

1617
class AeroBuildup(ExplicitAnalysis):
@@ -52,7 +53,7 @@ def __init__(
5253
airplane: Airplane,
5354
op_point: OperatingPoint,
5455
xyz_ref: np.ndarray | list[float] | None = None,
55-
model_size: str = "small",
56+
model_size: Literal["small", "large"] = "small",
5657
include_wave_drag: bool = True,
5758
):
5859
"""

aerosandbox/atmosphere/atmosphere.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def density(self):
170170

171171
return rho
172172

173-
def density_altitude(self, method: str = "approximate"):
173+
def density_altitude(self, method: Literal["approximate", "exact"] = "approximate"):
174174
"""
175175
Returns the density altitude, in meters.
176176

aerosandbox/dynamics/point_mass/common_point_mass.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import aerosandbox.numpy as np
22
from aerosandbox.common import AeroSandboxObject
33
from abc import ABC, abstractmethod
4-
from typing import Sequence
4+
from typing import Literal, Sequence
55
from aerosandbox import (
66
MassProperties,
77
Opti,
@@ -13,7 +13,7 @@
1313
from aerosandbox.tools.string_formatting import trim_string
1414
import inspect
1515
import copy
16-
from aerosandbox.numpy.typing import Vectorizable, Scalar, Vector
16+
from aerosandbox.numpy.typing import Vectorizable, Vector
1717

1818

1919
class _DynamicsPointMassBaseClass(AeroSandboxObject, ABC):
@@ -363,7 +363,7 @@ def add_force(
363363
Fx: float | np.ndarray = 0,
364364
Fy: float | np.ndarray = 0,
365365
Fz: float | np.ndarray = 0,
366-
axes: str = "wind",
366+
axes: Literal["geometry", "body", "wind", "stability", "earth"] = "wind",
367367
) -> None:
368368
"""
369369
Adds a force (in whichever axis system you choose) to this Dynamics instance.
@@ -423,14 +423,14 @@ def op_point(self):
423423
def draw(
424424
self,
425425
vehicle_model: "Airplane | PolyData | None" = None,
426-
backend: str = "pyvista",
426+
backend: Literal["pyvista"] = "pyvista",
427427
plotter=None,
428428
draw_axes: bool = True,
429429
draw_global_axes: bool = True,
430430
draw_global_grid: bool = True,
431431
scale_vehicle_model: float | None = None,
432432
n_vehicles_to_draw: int = 10,
433-
cg_axes: str = "geometry",
433+
cg_axes: Literal["geometry", "body", "wind", "stability"] = "geometry",
434434
draw_trajectory_line: bool = True,
435435
trajectory_line_color=None,
436436
draw_altitude_drape: bool = True,

aerosandbox/dynamics/point_mass/point_1D/horizontal.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
DynamicsPointMass3DCartesian,
33
)
44
from aerosandbox.weights.mass_properties import MassProperties
5-
import aerosandbox.numpy as np
65
from aerosandbox.numpy.typing import Vectorizable
76

87

aerosandbox/dynamics/point_mass/point_1D/vertical.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
DynamicsPointMass3DCartesian,
33
)
44
from aerosandbox.weights.mass_properties import MassProperties
5-
import aerosandbox.numpy as np
65
from aerosandbox.numpy.typing import Vectorizable
76

87

aerosandbox/dynamics/point_mass/point_2D/cartesian.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
DynamicsPointMass3DCartesian,
33
)
44
from aerosandbox.weights.mass_properties import MassProperties
5-
import aerosandbox.numpy as np
65
from aerosandbox.numpy.typing import Vectorizable
76

87

aerosandbox/dynamics/point_mass/point_2D/speed_gamma.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
DynamicsPointMass3DSpeedGammaTrack,
33
)
44
from aerosandbox.weights.mass_properties import MassProperties
5-
import aerosandbox.numpy as np
65
from aerosandbox.numpy.typing import Vectorizable
76

87

aerosandbox/dynamics/point_mass/point_3D/speed_gamma_track.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
)
44
from aerosandbox.weights.mass_properties import MassProperties
55
import aerosandbox.numpy as np
6-
from aerosandbox.numpy.typing import Vectorizable, Scalar
6+
from aerosandbox.numpy.typing import Vectorizable
77

88

99
class DynamicsPointMass3DSpeedGammaTrack(_DynamicsPointMassBaseClass):

aerosandbox/dynamics/rigid_body/rigid_2D/body.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
DynamicsRigidBody3DBodyEuler,
33
)
44
from aerosandbox.weights.mass_properties import MassProperties
5-
import aerosandbox.numpy as np
65
from aerosandbox.numpy.typing import Vectorizable
76

87

aerosandbox/geometry/airfoil/airfoil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import json
1717
from pathlib import Path
1818
import os
19-
from aerosandbox.numpy.typing import Vectorizable, ArrayLike
19+
from aerosandbox.numpy.typing import Vectorizable
2020

2121

2222
class Airfoil(Polygon):

0 commit comments

Comments
 (0)