From 382c90d40d84988b883083ca117d35e4ac34e8f7 Mon Sep 17 00:00:00 2001 From: peno64 <32430988+peno64@users.noreply.github.com> Date: Sat, 2 Dec 2023 23:12:25 +0100 Subject: [PATCH] Remove python 2.7 / Leia support (#113) * Revert changes done for matrix * Remove python 2.7 / Leia support * Updates for pylint * update for pylint * remove python 3.5 & 3.6 support * make pylint happy * make pylint happier * make pylint super happy --- .github/workflows/addon-check.yml | 2 +- .github/workflows/ci.yml | 6 +----- .pylintrc | 3 +++ resources/lib/modules/iptvsimple.py | 13 ++++++++----- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/addon-check.yml b/.github/workflows/addon-check.yml index c3eafd9..b1a3988 100644 --- a/.github/workflows/addon-check.yml +++ b/.github/workflows/addon-check.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - kodi-version: [ leia, matrix ] + kodi-version: [ matrix ] steps: - name: Check out ${{ github.sha }} from repository ${{ github.repository }} uses: actions/checkout@v2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf2c873..5b11af6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,12 +15,8 @@ jobs: fail-fast: false matrix: os: [ ubuntu-latest ] - python-version: [ 2.7, 3.5, 3.6, 3.7, 3.8, 3.9 ] + python-version: [ 3.7, 3.8, 3.9 ] include: - # Kodi Leia on Windows uses a bundled Python 2.7. - - os: windows-latest - python-version: 2.7 - # Kodi Matrix on Windows uses a bundled Python 3.8, but we test 3.9 also to be sure. - os: windows-latest python-version: 3.8 diff --git a/.pylintrc b/.pylintrc index 0f0879c..d9ad428 100644 --- a/.pylintrc +++ b/.pylintrc @@ -13,6 +13,9 @@ disable= too-many-branches, too-many-instance-attributes, too-many-locals, + consider-using-f-string, + use-dict-literal, + broad-exception-raised, max-line-length=160 max-statements=70 extension-pkg-whitelist=lxml \ No newline at end of file diff --git a/resources/lib/modules/iptvsimple.py b/resources/lib/modules/iptvsimple.py index f43d087..86552a7 100644 --- a/resources/lib/modules/iptvsimple.py +++ b/resources/lib/modules/iptvsimple.py @@ -7,13 +7,16 @@ import os import time +import glob +import shutil + +import xbmcvfs + import dateutil.parser import dateutil.tz from resources.lib import kodiutils -import xbmcvfs, glob, shutil - _LOGGER = logging.getLogger(__name__) IPTV_SIMPLE_ID = 'pvr.iptvsimple' @@ -71,9 +74,9 @@ def setup(cls): path = xbmcvfs.translatePath(addon.getAddonInfo('profile')) settingsxml = path + 'settings.xml' if os.path.isfile(settingsxml): - for f in glob.glob(path + "*.xml"): - if os.path.basename(f) != 'settings.xml': - shutil.copyfile(settingsxml, f) + for file in glob.glob(path + "*.xml"): + if os.path.basename(file) != 'settings.xml': + shutil.copyfile(settingsxml, file) return True