jacometoss/PyEWS

View on GitHub
electricalwiresizes/mbtal.py

Summary

Maintainability
F
1 mo
Test Coverage

Function mbtal has a Cognitive Complexity of 180 (exceeds 5 allowed). Consider refactoring.
Open

def mbtal(VF=None,VL=None,In=None,Nc=None,L=None,FA=None,Type=None,Ta=None,Vd=None,S=None,Fp=None,View=None,Fsc=None,To=None, Break=None, Fcond=None):

    if(VF==None or VL==None or In==None or Nc==None or L==None or FA==None or Type==None or Ta==None or Vd==None or S==None or Fp==None or View==None or Fsc==None or To==None or Break==None or Fcond==None):
        t = time.localtime()
        print('''
Severity: Minor
Found in electricalwiresizes/mbtal.py - About 3 days 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

Consider simplifying this complex logical expression.
Open

    if(VF==None or VL==None or In==None or Nc==None or L==None or FA==None or Type==None or Ta==None or Vd==None or S==None or Fp==None or View==None or Fsc==None or To==None or Break==None or Fcond==None):
        t = time.localtime()
        print('''
                 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
                                   
Severity: Critical
Found in electricalwiresizes/mbtal.py - About 4 hrs to fix

    Function mbtal has 16 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def mbtal(VF=None,VL=None,In=None,Nc=None,L=None,FA=None,Type=None,Ta=None,Vd=None,S=None,Fp=None,View=None,Fsc=None,To=None, Break=None, Fcond=None):
    Severity: Major
    Found in electricalwiresizes/mbtal.py - About 2 hrs to fix

      Avoid deeply nested control flow statements.
      Open

                          if ((round(datos[i][7],3)*FA*FT90>=In) and (((round(datos[i][7],3))/In)>=Fcond)):
                              datos[i].append('Yes')
                          else:
                              datos[i].append('Not')
                              
      Severity: Major
      Found in electricalwiresizes/mbtal.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            if ((round(datos[i][6],3)*FA*FT75>=In) and (((round(datos[i][6],3))/In)>Fcond)):
                                datos[i].append('Yes')
                            else:
                                datos[i].append('Not')
        
        Severity: Major
        Found in electricalwiresizes/mbtal.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if ((round(datos[i][7],3)*FA*FT90>=In) and (((round(datos[i][7],3))/In)>Fcond)):
                                  datos[i].append('Yes')
                              else:
                                  datos[i].append('Not')
                                  
          Severity: Major
          Found in electricalwiresizes/mbtal.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                if ((round(datos[i][5],3)*FA*FT60>=In) and (((round(datos[i][5],3))/In)>=Fcond)):
                                    datos[i].append('Yes')
                                else:
                                    datos[i].append('Not')
            
            Severity: Major
            Found in electricalwiresizes/mbtal.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if ((round(datos[i][6],3)*FA*FT75>=In) and (((round(datos[i][6],3))/In)>=Fcond)):
                                      datos[i].append('Yes')
                                  else:
                                      datos[i].append('Not')
              
              Severity: Major
              Found in electricalwiresizes/mbtal.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    if ((round(datos[i][7],3)*FA*FT90>=In) and (((round(datos[i][7],3))/In)>=Fcond)):
                                        datos[i].append('Yes')
                                    else:
                                        datos[i].append('Not')
                                        
                Severity: Major
                Found in electricalwiresizes/mbtal.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      if ((round(datos[i][5],3)*FA*FT60>=In) and (((round(datos[i][5],3))/In)>=Fcond)):
                                          datos[i].append('Yes')
                                      else:
                                          datos[i].append('Not')
                  
                  Severity: Major
                  Found in electricalwiresizes/mbtal.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        if ((round(datos[i][7],3)*FA*FT90>=In) and (((round(datos[i][7],3))/In)>=Fcond)):
                                            datos[i].append('Yes')
                                        else:
                                            datos[i].append('Not')
                                        
                    Severity: Major
                    Found in electricalwiresizes/mbtal.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          if ((round(datos[i][5],3)*FA*FT60>=In) and (((round(datos[i][5],3))/In)>=Fcond)):
                                              datos[i].append('Yes')
                                          else:
                                              datos[i].append('Not')
                      
                      Severity: Major
                      Found in electricalwiresizes/mbtal.py - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                            if ((round(datos[i][6],3)*FA*FT75>=In) and (((round(datos[i][6],3))/In)>=Fcond)):
                                                datos[i].append('Yes')
                                            else:
                                                datos[i].append('Not')
                        
                        Severity: Major
                        Found in electricalwiresizes/mbtal.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              if ((round(datos[i][5],3)*FA*FT60>=In) and (((round(datos[i][5],3))/In)>Fcond)):
                                                  datos[i].append('Yes')
                                              else:
                                                  datos[i].append('Not')
                          
                          Severity: Major
                          Found in electricalwiresizes/mbtal.py - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                if ((round(datos[i][6],3)*FA*FT75>=In) and (((round(datos[i][6],3))/In)>=Fcond)):
                                                    datos[i].append('Yes')
                                                else:
                                                    datos[i].append('Not')
                            
                            Severity: Major
                            Found in electricalwiresizes/mbtal.py - About 45 mins to fix

                              Identical blocks of code found in 2 locations. Consider refactoring.
                              Open

                                      if S==1:
                                          
                                          D1=LIn/(datos[i][1]*VF)
                                          datos[i].append(round(D1,3))
                                      
                              Severity: Major
                              Found in electricalwiresizes/mbtal.py and 1 other location - About 1 wk to fix
                              electricalwiresizes/mbtcu.py on lines 111..176

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 891.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                      elif S==3:
                                          
                                          D1=LIn/(datos[i][1]*VF)
                                          datos[i].append(round(D1,3))
                              
                              Severity: Major
                              Found in electricalwiresizes/mbtal.py and 2 other locations - About 1 wk to fix
                              electricalwiresizes/mbtcu.py on lines 240..299
                              electricalwiresizes/mbtcu.py on lines 303..360

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 877.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Identical blocks of code found in 2 locations. Consider refactoring.
                              Open

                                      elif S==2:
                                          
                                          D1=LIn/(datos[i][1]*VF)
                                          datos[i].append(round(D1,3))
                              
                              Severity: Major
                              Found in electricalwiresizes/mbtal.py and 1 other location - About 1 wk to fix
                              electricalwiresizes/mbtcu.py on lines 179..238

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 855.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                  if(VF==None or VL==None or In==None or Nc==None or L==None or FA==None or Type==None or Ta==None or Vd==None or S==None or Fp==None or View==None or Fsc==None or To==None or Break==None or Fcond==None):
                                      t = time.localtime()
                                      print('''
                                               ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
                                                                 
                              Severity: Major
                              Found in electricalwiresizes/mbtal.py and 1 other location - About 1 day to fix
                              electricalwiresizes/mbtcu.py on lines 9..29

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 132.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                              elif (To==90):
                                                  
                                                  if ((round(datos[i][7],3)*FA*FT90>=In) and (((round(datos[i][7],3))/In)>Fcond)):
                                                      datos[i].append('Yes')
                                                  else:
                              Severity: Major
                              Found in electricalwiresizes/mbtal.py and 2 other locations - About 6 hrs to fix
                              electricalwiresizes/mbtal.py on lines 320..325
                              electricalwiresizes/mbtal.py on lines 327..332

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 104.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                              elif (To==75):
                              
                                                  if ((round(datos[i][6],3)*FA*FT75>=In) and (((round(datos[i][6],3))/In)>Fcond)):
                                                      datos[i].append('Yes')
                                                  else:
                              Severity: Major
                              Found in electricalwiresizes/mbtal.py and 2 other locations - About 6 hrs to fix
                              electricalwiresizes/mbtal.py on lines 320..325
                              electricalwiresizes/mbtal.py on lines 335..340

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 104.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                              if (To==60):
                              
                                                  if ((round(datos[i][5],3)*FA*FT60>=In) and (((round(datos[i][5],3))/In)>Fcond)):
                                                      datos[i].append('Yes')
                                                  else:
                              Severity: Major
                              Found in electricalwiresizes/mbtal.py and 2 other locations - About 6 hrs to fix
                              electricalwiresizes/mbtal.py on lines 327..332
                              electricalwiresizes/mbtal.py on lines 335..340

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 104.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                  for i in range(len(dbConductorAl)):
                                       Zunitaria=Z(round(Rn(dbConductorAl[i][Rj],Ta),4),dbConductorAl[i][Xj],Fp)
                                       datos[i].append(Zunitaria[3])
                              Severity: Major
                              Found in electricalwiresizes/mbtal.py and 7 other locations - About 4 hrs to fix
                              electricalwiresizes/mbtal.py on lines 78..80
                              electricalwiresizes/mbtal.py on lines 82..84
                              electricalwiresizes/mbtal.py on lines 86..88
                              electricalwiresizes/mbtcu.py on lines 83..85
                              electricalwiresizes/mbtcu.py on lines 87..89
                              electricalwiresizes/mbtcu.py on lines 91..93
                              electricalwiresizes/mbtcu.py on lines 95..97

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 80.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                  for i in range(len(dbConductorAl)):
                                       Zunitaria=Z(round(Rn(dbConductorAl[i][Rj],Ta),4),dbConductorAl[i][Xj],Fp)
                                       datos[i].append(Zunitaria[0])
                              Severity: Major
                              Found in electricalwiresizes/mbtal.py and 7 other locations - About 4 hrs to fix
                              electricalwiresizes/mbtal.py on lines 82..84
                              electricalwiresizes/mbtal.py on lines 86..88
                              electricalwiresizes/mbtal.py on lines 90..92
                              electricalwiresizes/mbtcu.py on lines 83..85
                              electricalwiresizes/mbtcu.py on lines 87..89
                              electricalwiresizes/mbtcu.py on lines 91..93
                              electricalwiresizes/mbtcu.py on lines 95..97

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 80.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                  for i in range(len(dbConductorAl)):
                                       Zunitaria=Z(round(Rn(dbConductorAl[i][Rj],Ta),4),dbConductorAl[i][Xj],Fp)
                                       datos[i].append(Zunitaria[1])
                              Severity: Major
                              Found in electricalwiresizes/mbtal.py and 7 other locations - About 4 hrs to fix
                              electricalwiresizes/mbtal.py on lines 78..80
                              electricalwiresizes/mbtal.py on lines 86..88
                              electricalwiresizes/mbtal.py on lines 90..92
                              electricalwiresizes/mbtcu.py on lines 83..85
                              electricalwiresizes/mbtcu.py on lines 87..89
                              electricalwiresizes/mbtcu.py on lines 91..93
                              electricalwiresizes/mbtcu.py on lines 95..97

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 80.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                  for i in range(len(dbConductorAl)):
                                       Zunitaria=Z(round(Rn(dbConductorAl[i][Rj],Ta),4),dbConductorAl[i][Xj],Fp)
                                       datos[i].append(Zunitaria[2])
                              Severity: Major
                              Found in electricalwiresizes/mbtal.py and 7 other locations - About 4 hrs to fix
                              electricalwiresizes/mbtal.py on lines 78..80
                              electricalwiresizes/mbtal.py on lines 82..84
                              electricalwiresizes/mbtal.py on lines 90..92
                              electricalwiresizes/mbtcu.py on lines 83..85
                              electricalwiresizes/mbtcu.py on lines 87..89
                              electricalwiresizes/mbtcu.py on lines 91..93
                              electricalwiresizes/mbtcu.py on lines 95..97

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 80.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Identical blocks of code found in 2 locations. Consider refactoring.
                              Open

                                  if Type==1:
                                  #Conductores en ducto de PVC
                                      Rj=1
                                      Xj=2
                                  elif Type==2:
                              Severity: Major
                              Found in electricalwiresizes/mbtal.py and 1 other location - About 3 hrs to fix
                              electricalwiresizes/mbtcu.py on lines 37..48

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 62.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Identical blocks of code found in 2 locations. Consider refactoring.
                              Open

                                  if View == 1:
                                      #Mostrar informaciĆ³n en PSQL
                                      print(tabulate(datos, headers=["AWG/KCM","1F/2H", "2F/3H","3F/3H","3F/4H", "60", "75", "90","%Vd/1F", "%Vd/2F","%Vd/3F","%Vd/3F","Nc", "In", "60", "75", "90", "Op", "ITM"], tablefmt='psql'))
                                  elif View == 2:
                                      #Mostrar la informaciĆ³n en lista
                              Severity: Major
                              Found in electricalwiresizes/mbtal.py and 1 other location - About 2 hrs to fix
                              electricalwiresizes/mbtcu.py on lines 361..366

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 58.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Identical blocks of code found in 2 locations. Consider refactoring.
                              Open

                                  datos=[
                                  ["6 AWG"],
                                  ["4 AWG"],
                                  ["2 AWG"],
                                  ["1/0 AWG"],
                              Severity: Major
                              Found in electricalwiresizes/mbtal.py and 1 other location - About 2 hrs to fix
                              electricalwiresizes/shortcircuit.py on lines 103..117

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 51.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 9 locations. Consider refactoring.
                              Open

                                  for i in range(len(dbConductorAl)):
                                       datos[i].append(dbConductorAl[i][7])
                              Severity: Major
                              Found in electricalwiresizes/mbtal.py and 8 other locations - About 1 hr to fix
                              electricalwiresizes/mbtal.py on lines 97..98
                              electricalwiresizes/mbtal.py on lines 100..101
                              electricalwiresizes/mbtcu.py on lines 99..100
                              electricalwiresizes/mbtcu.py on lines 102..103
                              electricalwiresizes/mbtcu.py on lines 105..106
                              electricalwiresizes/mbtcustd.py on lines 88..89
                              electricalwiresizes/mbtcustd.py on lines 91..92
                              electricalwiresizes/mbtcustd.py on lines 94..95

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 41.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 9 locations. Consider refactoring.
                              Open

                                  for i in range(len(dbConductorAl)):
                                       datos[i].append(dbConductorAl[i][9])
                              Severity: Major
                              Found in electricalwiresizes/mbtal.py and 8 other locations - About 1 hr to fix
                              electricalwiresizes/mbtal.py on lines 94..95
                              electricalwiresizes/mbtal.py on lines 97..98
                              electricalwiresizes/mbtcu.py on lines 99..100
                              electricalwiresizes/mbtcu.py on lines 102..103
                              electricalwiresizes/mbtcu.py on lines 105..106
                              electricalwiresizes/mbtcustd.py on lines 88..89
                              electricalwiresizes/mbtcustd.py on lines 91..92
                              electricalwiresizes/mbtcustd.py on lines 94..95

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 41.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 9 locations. Consider refactoring.
                              Open

                                  for i in range(len(dbConductorAl)):
                                       datos[i].append(dbConductorAl[i][8])
                              Severity: Major
                              Found in electricalwiresizes/mbtal.py and 8 other locations - About 1 hr to fix
                              electricalwiresizes/mbtal.py on lines 94..95
                              electricalwiresizes/mbtal.py on lines 100..101
                              electricalwiresizes/mbtcu.py on lines 99..100
                              electricalwiresizes/mbtcu.py on lines 102..103
                              electricalwiresizes/mbtcu.py on lines 105..106
                              electricalwiresizes/mbtcustd.py on lines 88..89
                              electricalwiresizes/mbtcustd.py on lines 91..92
                              electricalwiresizes/mbtcustd.py on lines 94..95

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 41.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Identical blocks of code found in 2 locations. Consider refactoring.
                              Open

                              def mbtal(VF=None,VL=None,In=None,Nc=None,L=None,FA=None,Type=None,Ta=None,Vd=None,S=None,Fp=None,View=None,Fsc=None,To=None, Break=None, Fcond=None):
                              Severity: Minor
                              Found in electricalwiresizes/mbtal.py and 1 other location - About 45 mins to fix
                              electricalwiresizes/mbtcu.py on lines 7..7

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 35.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              There are no issues that match your filters.

                              Category
                              Status