EventGhost/EventGhost

View on GitHub
plugins/SunTracker/Sun.py

Summary

Maintainability
D
1 day
Test Coverage

File Sun.py has 368 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
"""
SUNRISET.C - computes Sun rise/set times, start/end of twilight, and
             the length of the day at any date and latitude
Severity: Minor
Found in plugins/SunTracker/Sun.py - About 4 hrs to fix

    Sun has 29 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Sun:
    
        def __init__(self):
            """"""
    
    
    Severity: Minor
    Found in plugins/SunTracker/Sun.py - About 3 hrs to fix

      Function __daylen__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def __daylen__(self, year, month, day, lon, lat, altit, upper_limb):
      Severity: Major
      Found in plugins/SunTracker/Sun.py - About 50 mins to fix

        Function __sunriset__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def __sunriset__(self, year, month, day, lon, lat, altit, upper_limb):
        Severity: Major
        Found in plugins/SunTracker/Sun.py - About 50 mins to fix

          Function dayAstronomicalTwilightLength has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def dayAstronomicalTwilightLength(self, year, month, day, lon, lat):
          Severity: Minor
          Found in plugins/SunTracker/Sun.py - About 35 mins to fix

            Function nauticalTwilight has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def nauticalTwilight(self, year, month, day, lon, lat):
            Severity: Minor
            Found in plugins/SunTracker/Sun.py - About 35 mins to fix

              Function dayNauticalTwilightLength has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def dayNauticalTwilightLength(self, year, month, day, lon, lat):
              Severity: Minor
              Found in plugins/SunTracker/Sun.py - About 35 mins to fix

                Function astronomicalTwilight has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def astronomicalTwilight(self, year, month, day, lon, lat):
                Severity: Minor
                Found in plugins/SunTracker/Sun.py - About 35 mins to fix

                  Function dayCivilTwilightLength has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def dayCivilTwilightLength(self, year, month, day, lon, lat):
                  Severity: Minor
                  Found in plugins/SunTracker/Sun.py - About 35 mins to fix

                    Function civilTwilight has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def civilTwilight(self, year, month, day, lon, lat):
                    Severity: Minor
                    Found in plugins/SunTracker/Sun.py - About 35 mins to fix

                      Function sunRiseSet has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def sunRiseSet(self, year, month, day, lon, lat):
                      Severity: Minor
                      Found in plugins/SunTracker/Sun.py - About 35 mins to fix

                        Function dayLength has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def dayLength(self, year, month, day, lon, lat):
                        Severity: Minor
                        Found in plugins/SunTracker/Sun.py - About 35 mins to fix

                          There are no issues that match your filters.

                          Category
                          Status