Skip to content

Commit e0f8ce0

Browse files
committed
Fixes F821 and E721 errors.
1 parent d4581ed commit e0f8ce0

File tree

17 files changed

+54
-19
lines changed

17 files changed

+54
-19
lines changed

aerosandbox/aerodynamics/aero_3D/aero_buildup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,19 @@
77
from aerosandbox.aerodynamics.aero_3D.aero_buildup_submodels.fuselage_aerodynamics_utilities import (
88
critical_mach,
99
jorgensen_eta,
10+
fuselage_base_drag_coefficient,
11+
fuselage_form_factor,
1012
)
1113
from aerosandbox.library.aerodynamics import transonic
1214
import aerosandbox.library.aerodynamics as aerolib
1315
from aerosandbox.aerodynamics.aero_3D.aero_buildup_submodels.softmax_scalefree import (
1416
softmax_scalefree,
1517
)
1618
from dataclasses import dataclass
17-
from typing import Literal
19+
from typing import Literal, TYPE_CHECKING
20+
21+
if TYPE_CHECKING:
22+
from aerosandbox.geometry import ControlSurface
1823

1924

2025
class AeroBuildup(ExplicitAnalysis):

aerosandbox/aerodynamics/aero_3D/lifting_line.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@
88
from aerosandbox.aerodynamics.aero_3D.singularities.point_source import (
99
calculate_induced_velocity_point_source,
1010
)
11-
from typing import Callable
11+
from typing import Callable, TYPE_CHECKING
1212
from aerosandbox.aerodynamics.aero_3D.aero_buildup import AeroBuildup
1313
from aerosandbox.numpy.typing import Vectorizable
1414
from dataclasses import dataclass
15+
import aerosandbox.geometry.mesh_utilities as mesh_utils
16+
17+
if TYPE_CHECKING:
18+
from aerosandbox.geometry import Airfoil, ControlSurface
1519

1620

1721
### Define some helper functions that take a vector and make it a Nx1 or 1xN, respectively.

aerosandbox/aerodynamics/aero_3D/nonlinear_lifting_line.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
calculate_induced_velocity_point_source,
99
)
1010
import aerosandbox.numpy as np
11-
from typing import Any, Callable
11+
from typing import Any, Callable, TYPE_CHECKING
12+
import aerosandbox.geometry.mesh_utilities as mesh_utils
13+
14+
if TYPE_CHECKING:
15+
from aerosandbox.geometry import Airfoil, ControlSurface
1216

1317

1418
### Define some helper functions that take a vector and make it a Nx1 or 1xN, respectively.

aerosandbox/aerodynamics/aero_3D/test_aero_3D/test_lifting_line.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
# return analysis.run()
77

88
if __name__ == "__main__":
9-
test_lifting_line()
9+
# test_lifting_line() # Function is commented out above
1010
# pytest.main()
11+
pass

aerosandbox/aerodynamics/aero_3D/vortex_lattice_method.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
)
88
from typing import Any, Callable
99
import copy
10+
import aerosandbox.geometry.mesh_utilities as mesh_utils
1011

1112

1213
### Define some helper functions that take a vector and make it a Nx1 or 1xN, respectively.

aerosandbox/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def __eq__(self, other):
3737
if self is other: # If they point to the same object in memory, they're equal
3838
return True
3939

40-
if type(self) != type(
41-
other
40+
if not isinstance(
41+
other, type(self)
4242
): # If they are of different types, they cannot be equal
4343
return False
4444

aerosandbox/dynamics/point_mass/common_point_mass.py

Lines changed: 4 additions & 1 deletion
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 Literal, Sequence
4+
from typing import Literal, Sequence, TYPE_CHECKING
55
from aerosandbox import (
66
MassProperties,
77
Opti,
@@ -15,6 +15,9 @@
1515
import copy
1616
from aerosandbox.numpy.typing import Vectorizable, Vector
1717

18+
if TYPE_CHECKING:
19+
from pyvista import PolyData
20+
1821

1922
class _DynamicsPointMassBaseClass(AeroSandboxObject, ABC):
2023
@abstractmethod

aerosandbox/geometry/airfoil/airfoil.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
get_file_coordinates,
99
)
1010
from aerosandbox.library.aerodynamics import transonic
11+
from typing import TYPE_CHECKING
12+
13+
if TYPE_CHECKING:
14+
from aerosandbox.geometry.airfoil.kulfan_airfoil import KulfanAirfoil
15+
from aerosandbox.geometry import ControlSurface
1116
from aerosandbox.modeling.splines.hermite import (
1217
cubic_hermite_patch,
1318
)

aerosandbox/geometry/airfoil/kulfan_airfoil.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
)
77
import warnings
88
from aerosandbox.numpy.typing import Vectorizable, ArrayLike, Scalar
9+
from typing import TYPE_CHECKING
10+
11+
if TYPE_CHECKING:
12+
from aerosandbox.geometry import ControlSurface
913

1014

1115
class KulfanAirfoil(Airfoil):

aerosandbox/geometry/airplane.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import itertools
22
from aerosandbox import AeroSandboxObject
3-
from typing import Any, Literal, Sequence
3+
from typing import Any, Literal, Sequence, TYPE_CHECKING
44
import aerosandbox.numpy as np
55
import aerosandbox.geometry.mesh_utilities as mesh_utils
66
from aerosandbox.geometry.wing import Wing
@@ -10,6 +10,10 @@
1010
import copy
1111
from pathlib import Path
1212

13+
if TYPE_CHECKING:
14+
import matplotlib.axes
15+
from cadquery import Workplane
16+
1317

1418
class Airplane(AeroSandboxObject):
1519
"""

0 commit comments

Comments
 (0)