Showing 63 of 70 total issues
Function __call__
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
def __call__(self, wrapped_function: T.Callable):
"""Make decorator.
Parameters
----------
- Read upRead up
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"
Further reading
File crossmatch.py
has 547 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
"""Catalog x-matching.
Built from the extensive x-matching program in Jo Bovy's ``gaia_tools``,
File orbitskyoffset.py
has 524 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
"""Orbit SkyOffset Frames.
Like `~astropy.coordinates.Galactocentric` needs ``galcen_coord`` and other
Function xmatch_decorator
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
def xmatch_decorator(
function: T.Callable = None,
*,
_doc_style: str = "numpy",
_doc_fmt: T.Dict[str, T.Any] = {},
- Read upRead up
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"
Further reading
File orbitoffset.py
has 462 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
"""Orbit Offset Frames.
Like `~astropy.coordinates.Galactocentric` needs ``galcen_coord`` and other
File decorators.py
has 422 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
"""Decorators for functions accepting Astropy Quantities."""
__author__ = "Nathaniel Starkman"
File core.py
has 413 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
"""Table Core Functions.
.. todo::
Function from_galpy_orbit
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def from_galpy_orbit(
cls,
*args,
orbit,
orbit_bkw=None,
- Read upRead up
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"
Further reading
Function from_galpy_orbit
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def from_galpy_orbit(
cls,
*args,
orbit,
orbit_bkw=None,
- Read upRead up
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"
Further reading
File MegaCamGen1_from_PS1.py
has 406 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
"""PanSTARRS 1 bands from Mega-Cam gen1 bands."""
__author__ = "Nathaniel Starkman"
File representations.py
has 356 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
"""Attributes.
:mod:`~astropy.coordinates.attributes`
File __init__.py
has 322 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
"""MegaCam_Panstarrs Filter Transformations."""
__author__ = "Nathaniel Starkman"
File __init__.py
has 311 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
# see LICENSE.rst
# ----------------------------------------------------------------------------
#
TablesList
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
class TablesList(HomogeneousList):
"""Grouped Tables.
A subclass of list that contains only elements of a given type or
types. If an item that is not of the specified type is added to
Function cast_columns
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def cast_columns(
table: TableType,
recast: T.Dict[str, T.Union[T.Any, T.Tuple[T.Any, bool]]],
warn_mismatch: bool = True,
elementwise: bool = False,
- Read upRead up
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"
Further reading
File MegaCamGen3_from_PS1.py
has 299 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
"""PanSTARRS 1 bands from Mega-Cam gen1 bands."""
__author__ = "Nathaniel Starkman"
Function write
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def write(
self,
drct: str,
format="asdf",
split=True,
- Read upRead up
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"
Further reading
File PS1_from_MegaCamGen1.py
has 275 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
"""Mega-Cam Generation-1 bands from PanSTARRS 1 bands."""
__author__ = "Nathaniel Starkman"
File amuse.py
has 256 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
"""Astropy units, extended for AMUSE compatibility.
These units are also available in the :mod:`~utilipy.units` namespace.
Function __new__
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def __new__(cls, *args, **kwargs):
"""OrbitOffsetFrame."""
# We don't want to call this method if we've already set up
# an orbitoffset frame for this class.
if not (
- Read upRead up
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"