# poliastro/poliastro

### Showing 108 of 108 total issues

#### Function `temperature` has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open

``````    def temperature(self, alt, geometric=True):
""" Solves for temperature at given altitude.

Parameters
----------``````
Found in src/poliastro/atmosphere/coesa76.py - About 35 mins to fix

# Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

### A method's cognitive complexity is based on a few simple rules:

• Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
• Code is considered more complex for each "break in the linear flow of the code"
• Code is considered more complex when "flow breaking structures are nested"

#### Function `hyp2f1b` has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open

``````def hyp2f1b(x):
"""Hypergeometric function 2F1(3, 1, 5/2, x), see [Battin].

.. todo::
Found in src/poliastro/core/hyper.py - About 35 mins to fix

# Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

### A method's cognitive complexity is based on a few simple rules:

• Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
• Code is considered more complex for each "break in the linear flow of the code"
• Code is considered more complex when "flow breaking structures are nested"

#### Function `from_sbdb` has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open

``````    def from_sbdb(cls, name, **kwargs):
"""Return osculating `Orbit` by using `SBDB` from Astroquery.

Parameters
----------``````
Found in src/poliastro/twobody/orbit.py - About 35 mins to fix

# Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

### A method's cognitive complexity is based on a few simple rules:

• Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
• Code is considered more complex for each "break in the linear flow of the code"
• Code is considered more complex when "flow breaking structures are nested"

#### Function `_get_index` has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open

``````    def _get_index(self, x, x_levels):
""" Finds element in list and returns index.

Parameters
----------``````
Found in src/poliastro/atmosphere/base.py - About 25 mins to fix

# Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

### A method's cognitive complexity is based on a few simple rules:

• Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
• Code is considered more complex for each "break in the linear flow of the code"
• Code is considered more complex when "flow breaking structures are nested"

#### Function `newton` has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open

``````def newton(regime, x0, args=(), tol=1.48e-08, maxiter=50):
p0 = 1.0 * x0
for iter in range(maxiter):
if regime == "hyperbolic":
fval = _kepler_equation_hyper(p0, *args)``````
Found in src/poliastro/core/angles.py - About 25 mins to fix

# Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

### A method's cognitive complexity is based on a few simple rules:

• Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
• Code is considered more complex for each "break in the linear flow of the code"
• Code is considered more complex when "flow breaking structures are nested"

#### Function `_initial_guess` has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open

``````def _initial_guess(T, ll, M):
"""Initial guess.

"""
if M == 0:``````
Found in src/poliastro/core/iod.py - About 25 mins to fix

# Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

### A method's cognitive complexity is based on a few simple rules:

• Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
• Code is considered more complex for each "break in the linear flow of the code"
• Code is considered more complex when "flow breaking structures are nested"

#### Function `_find_xy` has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open

``````def _find_xy(ll, T, M, numiter, rtol):
"""Computes all x, y for given number of revolutions.

"""
# For abs(ll) == 1 the derivative is not continuous``````
Found in src/poliastro/core/iod.py - About 25 mins to fix

# Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

### A method's cognitive complexity is based on a few simple rules:

• Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
• Code is considered more complex for each "break in the linear flow of the code"
• Code is considered more complex when "flow breaking structures are nested"

#### Function `porkchop` has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open

``````def porkchop(
departure_body,
target_body,
launch_span,
arrival_span,``````
Found in src/poliastro/plotting/porkchop.py - About 25 mins to fix

# Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

### A method's cognitive complexity is based on a few simple rules:

• Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
• Code is considered more complex for each "break in the linear flow of the code"
• Code is considered more complex when "flow breaking structures are nested"

#### Function `rsmooth` has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open

``````def rsmooth(y):
if y.ndim < 2:
y = np.atleast_2d(y)
one_dim = True
else:``````
Found in src/poliastro/core/rsmooth.py - About 25 mins to fix

# Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

### A method's cognitive complexity is based on a few simple rules:

• Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
• Code is considered more complex for each "break in the linear flow of the code"
• Code is considered more complex when "flow breaking structures are nested"

#### TODO found Open

``    # TODO: Check polar case (see [Walker, 1985])``
Found in src/poliastro/core/elements.py by fixme

#### TODO found Open

``    # TODO: Test against the perigee and apogee``
Found in tests/tests_twobody/test_orbit.py by fixme

#### TODO found Open

``            # TODO: equation (42) should be applied instead of using coefficients``
Found in src/poliastro/atmosphere/coesa76.py by fixme

#### TODO found Open

``    # TODO: Rewrite to avoid iterating twice``
Found in src/poliastro/twobody/propagation.py by fixme

#### HACK found Open

``        # HACK: Only needed for Orbit.from_body_ephem``
Found in src/poliastro/twobody/orbit.py by fixme

#### TODO found Open

``    # TODO: Review``
Found in tests/tests_plotting/test_static.py by fixme

#### TODO found Open

``        # TODO replace w/ something smart (Sun/Earth special cased)``
Found in src/poliastro/frames/fixed.py by fixme

#### TODO found Open

``    # TODO: implement hyperbolic case``

#### TODO found Open

``            # TODO: equation (33c) should be applied instead of using coefficients``
Found in src/poliastro/atmosphere/coesa76.py by fixme

#### HACK found Open

``            # HACK: https://stackoverflow.com/a/13831816/554319``
Found in src/poliastro/plotting/static.py by fixme

#### TODO found Open

``    # TODO: Turn these into unit tests``
Found in src/poliastro/twobody/propagation.py by fixme