julienmalard/Tinamit

View on GitHub

Showing 184 of 188 total issues

Function __init__ has 11 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def __init__(símismo, nombre, nombre_py, unid, ec, parientes, inic=0, subs=None, líms=None, info=''):
Severity: Major
Found in tinamit0/envolt/mds/pysd/_vars.py - About 1 hr to fix

    Function __init__ has 11 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __init__(símismo, nombre, unid, ingr, egr, tmñ_ciclo, inic=0, líms=None, info=''):
    Severity: Major
    Found in tinamit0/envolt/bf/_impac.py - About 1 hr to fix

      Function __init__ has 11 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def __init__(símismo, nombre, unid, ingr, egr, tmñ_bloques, inic=0, líms=None, info=''):
      Severity: Major
      Found in tinamit0/envolt/bf/_bloq.py - About 1 hr to fix

        Function __init__ has 11 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def __init__(símismo, nombre, unid, ingr, egr, tmñ_ciclo, inic=0, líms=None, info=''):
        Severity: Major
        Found in tinamit0/envolt/bf/_deter.py - About 1 hr to fix

          Function _vec_var has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              def _vec_var(símismo, var, tx=False):
                  l_datos = []
                  with open(símismo.archivo, encoding=símismo.codif) as d:
                      lector = csv.DictReader(d)
          
          
          Severity: Minor
          Found in tinamit0/datos/fuente.py - About 1 hr 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"

          Further reading

          Function act_arch_trads has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

          def act_arch_trads(l_d_t):
              """
              Actualiza el fuente de traducciones.
          
              Parameters
          Severity: Minor
          Found in tinamit0/unids/trads.py - About 1 hr 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"

          Further reading

          Function gen_mds has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

          def gen_mds(archivo):
              """
              Automáticamente generar un :class:`~tinamit.envolt.mds.ModeloDS` desde un archivo.
          
              Parameters
          Severity: Minor
          Found in tinamit0/envolt/mds/_auto.py - About 1 hr 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"

          Further reading

          Function detectar_codif has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

          def detectar_codif(archivo, máx_líneas=None, cortar=None, cert=0.95, auto='utf-8'):
              """
              Detecta la codificación de un fuente. (Necesario porque todavía existen programas dinosaurios que no entienden
              los milagros de unicódigo.)
          
          
          Severity: Minor
          Found in tinamit0/cositas.py - About 1 hr 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"

          Further reading

          Function _validar_conex has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              def _validar_conex(símismo, conex: List[ConexiónVars]):
                  for cnx in conex:
                      for m in [cnx.modelo_a, cnx.modelo_de]:
                          if m not in símismo.modelos:
                              raise ValueError('Modelo {} no definido.'.format(m))
          Severity: Minor
          Found in src/tinamit/conectado.py - About 1 hr 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"

          Further reading

          Function calibrar has 10 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def calibrar(
          Severity: Major
          Found in tinamit0/calibs/ec/_bayes.py - About 1 hr to fix

            Function dibujar_mapa_de_res has 10 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def dibujar_mapa_de_res(
            Severity: Major
            Found in tinamit0/geog/mapa.py - About 1 hr to fix

              Function __init__ has 10 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def __init__(símismo, nombre, unid, ec, parientes, inic, subs=None, líms=None, info=''):
              Severity: Major
              Found in tinamit0/envolt/mds/_vars.py - About 1 hr to fix

                Function __init__ has 10 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __init__(símismo, nombre, unid, ec, parientes, inic, subs=None, líms=None, info=''):
                Severity: Major
                Found in tinamit0/envolt/mds/_vars.py - About 1 hr to fix

                  Function __init__ has 10 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def __init__(símismo, nombre, unid, ec, parientes, inic, subs=None, líms=None, info=''):
                  Severity: Major
                  Found in tinamit0/envolt/mds/_vars.py - About 1 hr to fix

                    Function __init__ has 10 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def __init__(símismo, nombre, unid, ec, parientes, inic, subs=None, líms=None, info=''):
                    Severity: Major
                    Found in tinamit0/envolt/mds/_vars.py - About 1 hr to fix

                      Function limpiar_mds has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def limpiar_mds(direc='./recursos/mds'):
                          """
                          Limpiamos todos los documentos temporarios generados por los programas de modelos DS.
                          """
                          for c in os.walk(direc):
                      Severity: Minor
                      Found in tinamit0/pruebas/test_mds.py - About 1 hr 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"

                      Further reading

                      Function __init__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def __init__(símismo, nombre, unid, ingr, egr, inic=0, líms=None, info=''):
                      Severity: Major
                      Found in tinamit0/mod/var.py - About 1 hr to fix

                        Function __init__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def __init__(símismo, nombre, unid, ingr, egr, inic=0, líms=None, info=''):
                        Severity: Major
                        Found in tinamit0/envolt/bf/_indeter.py - About 1 hr to fix

                          Function _resolv_conv has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def _resolv_conv(unid_1, unid_2, conv):
                              if conv is None:
                                  # Si no se especificó factor de conversión...
                          
                                  mensaje = _('No se pudo identificar una conversión automática entre {} y {}. '
                          Severity: Minor
                          Found in tinamit0/conect/_conex.py - About 1 hr 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"

                          Further reading

                          Function simular_grupo has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def simular_grupo(símismo, ops_grupo, nombre='Tinamït', paralelo=False):
                                  """
                                  Efectua un grupo de simulaciones. Muy útil para accelerar corridas múltiples.
                          
                                  Parameters
                          Severity: Minor
                          Found in tinamit0/mod/modelo.py - About 1 hr 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"

                          Further reading

                          Severity
                          Category
                          Status
                          Source
                          Language