[packages/pldnotify: 2/7] Apply PEP-8 formatting

glen glen at pld-linux.org
Wed Feb 24 10:07:35 CET 2021


commit b31cda7b9a47d22b34b45ffa08576ffc949b9541
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Wed Feb 24 10:55:04 2021 +0200

    Apply PEP-8 formatting

 pldnotify.py | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/pldnotify.py b/pldnotify.py
index f938ecf..bbf8f11 100755
--- a/pldnotify.py
+++ b/pldnotify.py
@@ -8,6 +8,8 @@ from os import path
 """
 RPM Spec parser
 """
+
+
 class RPMSpec:
     def __init__(self, specfile):
         self._specfile = specfile
@@ -51,11 +53,14 @@ class RPMSpec:
                 raise ValueError("%s: spec with no version" % self._specfile)
         return self._version
 
+
 """
 Class containing specific remote repositories,
 i.e Anitya (release-monitoring.org), NPM (nodejs), etc ...
 
 """
+
+
 class Checker:
     distro = 'pld-linux'
     checkers = ['anitya']
@@ -96,6 +101,7 @@ class Checker:
         Check for update from release-monitoring.org (Anitya).
         Raise ValueError or version from anitya project.
     """
+
     def anitya(self):
         url = "https://release-monitoring.org/api/project/%s/%s" % (self.distro, self.spec.name)
         response = requests.get(url)
@@ -113,6 +119,7 @@ class Checker:
     """
         Return alternatives found from Anitya
     """
+
     def anitya_alternatives(self):
         url = "https://release-monitoring.org/api/projects/?pattern=%s" % self.spec.name
         data = requests.get(url).json()
@@ -131,16 +138,17 @@ class Checker:
 
         return "Possible matches:\n- %s" % ("\n- ".join(r))
 
+
 def main():
     parser = argparse.ArgumentParser(description='PLD-Notify: project to monitor upstream releases')
 
     parser.add_argument('-d', '--debug',
-        action='store_true',
-        help='Enable debugging (default: %(default)s)')
+                        action='store_true',
+                        help='Enable debugging (default: %(default)s)')
 
     parser.add_argument('packages',
-        type=str, nargs='*',
-        help='Package to check')
+                        type=str, nargs='*',
+                        help='Package to check')
 
     args = parser.parse_args()
 
@@ -165,6 +173,7 @@ def main():
         else:
             print("[%s] No updates found" % (package))
 
+
 if __name__ == '__main__':
     main()
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/pldnotify.git/commitdiff/f944e2d9d8031849f241d4e905825d6ae1e235e4



More information about the pld-cvs-commit mailing list