kodi-czsk/plugin.video.sosac.ph

View on GitHub
resources/lib/sutils.py

Summary

Maintainability
F
1 wk
Test Coverage

Function run_custom has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
Open

    def run_custom(self, params):
        if 'action' in params:
            icon = os.path.join(self.addon.getAddonInfo('path'), 'icon.png')
            if params['action'] == sosac.LIBRARY_ACTION_REMOVE_SUBSCRIPTION:
                subs = self.get_subs()
Severity: Minor
Found in resources/lib/sutils.py - About 1 day 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 add_item has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
Open

    def add_item(self, params):
        error = False
        if not 'refresh' in params:
            params['refresh'] = str(self.getSetting("refresh_time"))
        sub = {'name': params['name'], 'refresh': params[
Severity: Minor
Found in resources/lib/sutils.py - About 6 hrs 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 evalSchedules has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
Open

    def evalSchedules(self):
        if not self.scanRunning() and not self.isPlaying():
            notified = False
            util.info("SOSAC Loading subscriptions")
            subs = self.get_subs()
Severity: Minor
Found in resources/lib/sutils.py - About 5 hrs 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

File sutils.py has 336 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import util
import xbmcprovider
import xbmcutil
import xbmcvfs
import xbmcgui
Severity: Minor
Found in resources/lib/sutils.py - About 4 hrs to fix

    Function add_item_to_library has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

        def add_item_to_library(self, item_path, item_url):
            error = False
            new = False
            if item_path:
                item_path = xbmc.translatePath(item_path)
    Severity: Minor
    Found in resources/lib/sutils.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

    Avoid deeply nested control flow statements.
    Open

                            if self.dialog.iscanceled():
                                return
                            if 'progress' in show:
    Severity: Major
    Found in resources/lib/sutils.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if self.dialog.iscanceled():
                                  return
                              if 'progress' in video:
      Severity: Major
      Found in resources/lib/sutils.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if next_check < time.time():
                                    if not notified:
                                        self.showNotification(
                                            'Subscription', 'Chcecking')
                                        notified = True
        Severity: Major
        Found in resources/lib/sutils.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if 'progress' in show:
                                      self.dialog.update(show['progress'])
                                  else:
                                      item = show['menu'][sosac.LIBRARY_MENU_ITEM_ADD]
                                      item["update"] = True
          Severity: Major
          Found in resources/lib/sutils.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if 'progress' in video:
                                        self.dialog.update(video['progress'])
                                    else:
                                        item = video['menu'][sosac.LIBRARY_MENU_ITEM_ADD]
                                        item["update"] = True
            Severity: Major
            Found in resources/lib/sutils.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if 'progress' in video:
                                          self.dialog.update(video['progress'])
                                      else:
                                          item = video['menu'][sosac.LIBRARY_MENU_ITEM_ADD]
                                          item["update"] = True
              Severity: Major
              Found in resources/lib/sutils.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if self.dialog.iscanceled():
                                            return
                                        if 'progress' in video:
                Severity: Major
                Found in resources/lib/sutils.py - About 45 mins to fix

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

                      def service(self):
                          util.info("SOSAC Service Started")
                          try:
                              sleep_time = int(self.getSetting("start_sleep_time")) * 1000 * 60 * 60
                          except:
                  Severity: Minor
                  Found in resources/lib/sutils.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"

                  Further reading

                  Avoid too many return statements within this function.
                  Open

                                              return
                  Severity: Major
                  Found in resources/lib/sutils.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                                return
                    Severity: Major
                    Found in resources/lib/sutils.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                                  return
                      Severity: Major
                      Found in resources/lib/sutils.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                return False
                        Severity: Major
                        Found in resources/lib/sutils.py - About 30 mins to fix

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

                              def getTVDB(self, name, id):
                                  if id:
                                      data = util.request('http://thetvdb.com/api/GetSeriesByRemoteID.php?imdbid=tt' +
                                                          id + '&language=all')
                                      tvid = re.search('<id>(\d+)</id>', data)
                          Severity: Minor
                          Found in resources/lib/sutils.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"

                          Further reading

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

                                          if params['type'] == sosac.LIBRARY_TYPE_ALL_VIDEOS:
                                              self.dialog.create("Sosac", "Adding All Movies to library")
                                              self.dialog.update(0)
                                              videos = self.provider.library_list_all_videos()
                                              for video in videos:
                          Severity: Major
                          Found in resources/lib/sutils.py and 1 other location - About 1 day to fix
                          resources/lib/sutils.py on lines 276..291

                          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 152.

                          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 params['type'] == sosac.LIBRARY_TYPE_RECENT_VIDEOS:
                                              self.dialog.create("Sosac", "Adding Recent Movies to library")
                                              self.dialog.update(0)
                                              videos = self.provider.library_list_recent_videos()
                                              for video in videos:
                          Severity: Major
                          Found in resources/lib/sutils.py and 1 other location - About 1 day to fix
                          resources/lib/sutils.py on lines 260..275

                          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 152.

                          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 4 locations. Consider refactoring.
                          Open

                                          if ('csfd' in params and params['csfd'] and not
                                                  re.match('^$|^[?0]$', params['csfd'])):
                                              metadata += "http://www.csfd.cz/film/{0}\n".format(params['csfd'])
                          Severity: Major
                          Found in resources/lib/sutils.py and 3 other locations - About 2 hrs to fix
                          resources/lib/sutils.py on lines 176..178
                          resources/lib/sutils.py on lines 201..203
                          resources/lib/sutils.py on lines 204..206

                          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

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

                                          if ('csfd' in params and params['csfd'] and not
                                                  re.match('^$|^[?0]$', params['csfd'])):
                                              metadata += "http://www.csfd.cz/film/{0}\n".format(params['csfd'])
                          Severity: Major
                          Found in resources/lib/sutils.py and 3 other locations - About 2 hrs to fix
                          resources/lib/sutils.py on lines 176..178
                          resources/lib/sutils.py on lines 179..181
                          resources/lib/sutils.py on lines 201..203

                          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

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

                                          if ('imdb' in params and params['imdb'] and not
                                                  re.match('^$|^[?0]$', params['imdb'])):
                                              metadata += "http://www.imdb.com/title/tt{0}/\n".format(params['imdb'])
                          Severity: Major
                          Found in resources/lib/sutils.py and 3 other locations - About 2 hrs to fix
                          resources/lib/sutils.py on lines 179..181
                          resources/lib/sutils.py on lines 201..203
                          resources/lib/sutils.py on lines 204..206

                          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

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

                                          if ('imdb' in params and params['imdb'] and not
                                                  re.match('^$|^[?0]$', params['imdb'])):
                                              metadata += "http://www.imdb.com/title/tt{0}/\n".format(params['imdb'])
                          Severity: Major
                          Found in resources/lib/sutils.py and 3 other locations - About 2 hrs to fix
                          resources/lib/sutils.py on lines 176..178
                          resources/lib/sutils.py on lines 179..181
                          resources/lib/sutils.py on lines 204..206

                          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

                          Do not use bare 'except'
                          Open

                                  except:
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          When catching exceptions, mention specific exceptions when possible.

                          Okay: except Exception:
                          Okay: except BaseException:
                          E722: except:

                          Line too long (81 > 79 characters)
                          Open

                                  urllang = [urllib.urlencode({'seriesname': shortname, 'language': 'cs'}),
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          Test for membership should be 'not in'
                          Open

                                  if not 'refresh' in params:
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Negative comparison should be done using "not in" and "is not".

                          Okay: if x not in y:\n    pass
                          Okay: assert (X in Y or X is Z)
                          Okay: if not (X in Y):\n    pass
                          Okay: zz = x is not y
                          E713: Z = not X in Y
                          E713: if not X.B in Y:\n    pass
                          E714: if not X is Y:\n    pass
                          E714: Z = not X.B is Y

                          Line too long (93 > 79 characters)
                          Open

                                                                      '.' or c == '-' or c.isspace())]) if text else ''
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          Line too long (82 > 79 characters)
                          Open

                                      sleep_time = int(self.getSetting("start_sleep_time")) * 1000 * 60 * 60
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          Line too long (82 > 79 characters)
                          Open

                                              self.dialog.create("Sosac", "Adding Recent Movies to library")
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          Invalid escape sequence '\d'
                          Open

                                  shortname = re.search('(.+) (\(\d{4}\))', name).group(1)
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Invalid escape sequences are deprecated in Python 3.6.

                          Okay: regex = r'\.png$'
                          W605: regex = '\.png$'

                          Invalid escape sequence '\d'
                          Open

                                      tvid = re.search('<id>(\d+)</id>', data)
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Invalid escape sequences are deprecated in Python 3.6.

                          Okay: regex = r'\.png$'
                          W605: regex = '\.png$'

                          Line too long (86 > 79 characters)
                          Open

                                              metadata += "http://www.csfd.cz/film/{0}\n".format(params['csfd'])
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          Line too long (90 > 79 characters)
                          Open

                                                       self.normalize_filename(params['name'])) + '.strm', item_url)
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          Line too long (94 > 79 characters)
                          Open

                                  return unicodedata.normalize('NFKD', string.decode('utf-8')).encode('ascii', 'ignore')
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          Line too long (91 > 79 characters)
                          Open

                                              metadata += "http://www.imdb.com/title/tt{0}/\n".format(params['imdb'])
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          Line too long (93 > 79 characters)
                          Open

                                  if not error and new_items and not ('update' in params) and not ('notify' in params):
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          Invalid escape sequence '\d'
                          Open

                                      tvid = re.search('<id>(\d+)</id>', data)
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Invalid escape sequences are deprecated in Python 3.6.

                          Okay: regex = r'\.png$'
                          W605: regex = '\.png$'

                          Invalid escape sequence '('
                          Open

                                  shortname = re.search('(.+) (\(\d{4}\))', name).group(1)
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Invalid escape sequences are deprecated in Python 3.6.

                          Okay: regex = r'\.png$'
                          W605: regex = '\.png$'

                          Line too long (95 > 79 characters)
                          Open

                                              metadata += "http://thetvdb.com/index.php?tab=series&id={0}\n".format(tvid)
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          Line too long (82 > 79 characters)
                          Open

                                             urllib.urlencode({'seriesname': shortname, 'language': 'all'}),
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          Do not use bare 'except'
                          Open

                                  except:
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          When catching exceptions, mention specific exceptions when possible.

                          Okay: except Exception:
                          Okay: except BaseException:
                          E722: except:

                          Line too long (91 > 79 characters)
                          Open

                                              metadata += "http://www.imdb.com/title/tt{0}/\n".format(params['imdb'])
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          Line too long (81 > 79 characters)
                          Open

                                  validFilenameChars = "-_.() %s%s" % (string.ascii_letters, string.digits)
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          Invalid escape sequence ')'
                          Open

                                  shortname = re.search('(.+) (\(\d{4}\))', name).group(1)
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Invalid escape sequences are deprecated in Python 3.6.

                          Okay: regex = r'\.png$'
                          W605: regex = '\.png$'

                          Line too long (100 > 79 characters)
                          Open

                                      nfo_file = os.path.join(item_dir, self.normalize_filename(params['name']), 'tvshow.nfo')
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          Line too long (90 > 79 characters)
                          Open

                                  xbmcgui.Dialog().notification(self.encode(title), self.encode(message), time=time,
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          Line too long (92 > 79 characters)
                          Open

                                      data = util.request('http://thetvdb.com/api/GetSeriesByRemoteID.php?imdbid=tt' +
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          Do not use bare 'except'
                          Open

                                  except:
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          When catching exceptions, mention specific exceptions when possible.

                          Okay: except Exception:
                          Okay: except BaseException:
                          E722: except:

                          Line too long (86 > 79 characters)
                          Open

                                              metadata += "http://www.csfd.cz/film/{0}\n".format(params['csfd'])
                          Severity: Minor
                          Found in resources/lib/sutils.py by pep8

                          Limit all lines to a maximum of 79 characters.

                          There are still many devices around that are limited to 80 character
                          lines; plus, limiting windows to 80 characters makes it possible to
                          have several windows side-by-side.  The default wrapping on such
                          devices looks ugly.  Therefore, please limit all lines to a maximum
                          of 79 characters. For flowing long blocks of text (docstrings or
                          comments), limiting the length to 72 characters is recommended.
                          
                          Reports error E501.

                          There are no issues that match your filters.

                          Category
                          Status