Skip to content

Commit

Permalink
Disable pylint too-many-locals
Browse files Browse the repository at this point in the history
Disable the pylint error on the two functions that involve mathematical
computations that need the definition of several variables to make them
more efficient.
  • Loading branch information
santisoler committed Jul 16, 2020
1 parent 63df6e1 commit 087bd80
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions harmonica/forward/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def distance_spherical_core(
return dist, cospsi, coslambda


def distance_geodetic(point_p, point_q, ellipsoid):
def distance_geodetic(point_p, point_q, ellipsoid): # pylint: disable=too-many-locals
"""
Calculate the distance between two points in geodetic coordinates
Expand Down Expand Up @@ -271,7 +271,7 @@ def geodetic_distance_core(
prime_vertical_radius,
prime_vertical_radius_p,
ecc_sq,
):
): # pylint: disable=too-many-locals
"""
Core computation of distance between two points in geodetic coordinates
Expand Down Expand Up @@ -301,7 +301,7 @@ def geodetic_distance_core(
"""
upward_sum = prime_vertical_radius + height
upward_sum_p = prime_vertical_radius_p + height_p
distance = np.sqrt(
dist = np.sqrt(
upward_sum_p ** 2 * cosphi_p ** 2
+ upward_sum ** 2 * cosphi ** 2
- 2 * upward_sum * upward_sum_p * cosphi * cosphi_p * coslambda
Expand All @@ -315,4 +315,4 @@ def geodetic_distance_core(
* sinphi_p
)
)
return distance
return dist

0 comments on commit 087bd80

Please sign in to comment.