codingstyle: avoid long lines and put operators in next line
Hanno Böck

Hanno Böck commited on 2019-12-03 14:29:48
Zeige 1 geänderte Dateien mit 12 Einfügungen und 10 Löschungen.

... ...
@@ -109,7 +109,8 @@ config = configparser.ConfigParser()
109 109
 try:
110 110
     config.read(glob.glob('/usr/share/freewvs/*.freewvs'))
111 111
     config.read(glob.glob('/usr/local/share/freewvs/*.freewvs'))
112
-    config.read(glob.glob(os.path.dirname(sys.argv[0]) + '/freewvsdb/*.freewvs'))
112
+    config.read(glob.glob(os.path.dirname(sys.argv[0])
113
+                          + '/freewvsdb/*.freewvs'))
113 114
 except configparser.MissingSectionHeaderError as err:
114 115
     print("Error parsing config files: %s" % err)
115 116
 
... ...
@@ -117,7 +118,8 @@ vdb = []
117 118
 for sect in config.sections():
118 119
     item = {}
119 120
 
120
-    if config.getboolean(sect, 'thirdparty', fallback=False) and not opts.THIRDPARTY:
121
+    if (config.getboolean(sect, 'thirdparty', fallback=False)
122
+       and not opts.THIRDPARTY):
121 123
         continue
122 124
 
123 125
     # base options
... ...
@@ -130,8 +132,8 @@ for sect in config.sections():
130 132
     # match magic
131 133
     item['variable'] = []
132 134
     for var in config.get(sect, 'variable').split(","):
133
-        item['variable'].append(re.compile(re.escape(var) +
134
-                                r"[^0-9\n\r]*[.]*([0-9.]*[0-9])[^0-9.]"))
135
+        item['variable'].append(re.compile(re.escape(var)
136
+                                + r"[^0-9\n\r]*[.]*([0-9.]*[0-9])[^0-9.]"))
135 137
 
136 138
     # optional options
137 139
     if config.has_option(sect, 'extra_match'):
... ...
@@ -196,8 +198,8 @@ for fdir in args:
196 198
                         # Very ugly phpbb workaround
197 199
                         if item['add_minor']:
198 200
                             findversion = findversion.split('.')
199
-                            findversion[-1] = str(int(findversion[-1]) +
200
-                                                  int(item['add_minor']))
201
+                            findversion[-1] = str(int(findversion[-1])
202
+                                                  + int(item['add_minor']))
201 203
                             findversion = '.'.join(findversion)
202 204
 
203 205
                         if not (versioncompare(item['safe'].split('.'),
... ...
@@ -215,8 +217,8 @@ for fdir in args:
215 217
                             safev = "9999"
216 218
                             for ver in item['old_safe']:
217 219
                                 if(versioncompare(ver.split('.'),
218
-                                   findversion.split('.')) and
219
-                                   not versioncompare(ver.split('.'),
220
+                                   findversion.split('.'))
221
+                                   and not versioncompare(ver.split('.'),
220 222
                                    safev.split('.'))):
221 223
                                     safev = ver
222 224
                             if safev == "9999":
... ...
@@ -228,8 +230,8 @@ for fdir in args:
228 230
 
229 231
                     else:
230 232
                         if opts.DEBUG:
231
-                            print("regexp failed for " +
232
-                                  item['name'] + " on " + mfile)
233
+                            print("regexp failed for "
234
+                                  + item['name'] + " on " + mfile)
233 235
 
234 236
 if opts.OUTPUT == 'xml':
235 237
     print('</freewvs>')
236 238