[Git][NTPsec/ntpsec][master] PEP8 whitespace cleanup

Matt Selsky gitlab at mg.gitlab.com
Sun Aug 19 15:18:13 UTC 2018


Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
5f2db02d by Matt Selsky at 2018-08-19T15:14:43Z
PEP8 whitespace cleanup

Warnings fixed:
devel/linkcheck:73:1: E305 expected 2 blank lines after class or function definition, found 1
wafhelpers/waf.py:29:5: E306 expected 1 blank line before a nested definition, found 0
wafhelpers/pythonize-header:84:1: E305 expected 2 blank lines after class or function definition, found 1
tests/wscript:38:1: E101 indentation contains mixed spaces and tabs
tests/wscript:38:1: W191 indentation contains tabs
tests/wscript:38:3: E131 continuation line unaligned for hanging indent
tests/wscript:39:1: E101 indentation contains mixed spaces and tabs
wscript:913:1: E305 expected 2 blank lines after class or function definition, found 1
wscript:949:1: E305 expected 2 blank lines after class or function definition, found 1
contrib/ntpheatusb:130:1: E305 expected 2 blank lines after class or function definition, found 1

- - - - -


7 changed files:

- contrib/ntpconfigtest
- contrib/ntpheatusb
- devel/linkcheck
- tests/wscript
- wafhelpers/pythonize-header
- wafhelpers/waf.py
- wscript


Changes:

=====================================
contrib/ntpconfigtest
=====================================
@@ -14,8 +14,8 @@ try:
     with gzip.open(config_file_name, 'rb') as f:
         file_content = f.read()
 except:
-        print("ERROR: can not read your %s" % (config_file_name))
-        sys.exit(1)
+    print("ERROR: can not read your %s" % (config_file_name))
+    sys.exit(1)
 
 tests = (
     ('CONFIG_CPU_FREQ_GOV_PERFORMANCE', 'For best performance'),


=====================================
contrib/ntpheatusb
=====================================
@@ -97,10 +97,10 @@ Discrete PID control
         return "D_value=%s, I_value=%s" % (self.D_value, self.I_value)
 
     def setPoint(self, set_point):
-            """
-            Initialize the setpoint of PID
-            """
-            self.set_point = set_point
+        """
+        Initialize the setpoint of PID
+        """
+        self.set_point = set_point
 
     def update(self, current_value):
         """
@@ -116,9 +116,9 @@ Discrete PID control
         self.Integrator = self.Integrator + self.error
 
         if self.Integrator > self.Integrator_max:
-                self.Integrator = self.Integrator_max
+            self.Integrator = self.Integrator_max
         elif self.Integrator < self.Integrator_min:
-                self.Integrator = self.Integrator_min
+            self.Integrator = self.Integrator_min
 
         self.I_value = self.Integrator * self.Ki
 
@@ -126,6 +126,7 @@ Discrete PID control
 
         return PID
 
+
 # Work with argvars
 parser = argparse.ArgumentParser(description="make heat with USB relay")
 parser.add_argument('-p', '--pid',


=====================================
devel/linkcheck
=====================================
@@ -70,6 +70,7 @@ def tabulate(path):
         if m:
             references[m.group(0)] = (iostack[-1][1].name, linecount)
 
+
 if __name__ == '__main__':
     iostack = []
     references = {}


=====================================
tests/wscript
=====================================
@@ -35,7 +35,7 @@ def build(ctx):
     libntp_source = [
         "libntp/authkeys.c",
         "libntp/ntp_calendar.c",
-		"libntp/ntp_endian.c",
+        "libntp/ntp_endian.c",
         "libntp/ntp_random.c",
         "libntp/clocktime.c",
         "libntp/decodenetnum.c",


=====================================
wafhelpers/pythonize-header
=====================================
@@ -81,6 +81,7 @@ def pythonize(rfp, wfp):
         if not skipto:
             wfp.write(line)
 
+
 if __name__ == '__main__':
     if len(sys.argv) == 1:
         pythonize(sys.stdin, sys.stdout)


=====================================
wafhelpers/waf.py
=====================================
@@ -26,6 +26,7 @@ def manpage_subst_fun(self, code):
 
     # extract the vars foo into lst and replace @foo@ by %(foo)s
     lst = []
+
     def repl(match):
         g = match.group
         if g(1):


=====================================
wscript
=====================================
@@ -909,6 +909,7 @@ def bin_test(ctx):
     from wafhelpers.bin_test import cmd_bin_test
     cmd_bin_test(ctx, config)
 
+
 # Borrowed from https://www.rtems.org/
 variant_cmd = (
     ("build", BuildContext),
@@ -946,6 +947,7 @@ def init_handler(ctx):
         pprint("YELLOW", "--- %sing %s ---" % (cmd, v))
         obj.execute()
 
+
 commands = (
     ("install", "init_handler", None),
     ("uninstall", "init_handler", None),



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/5f2db02d06addf190eb7c69817b8daa75af3a970

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/5f2db02d06addf190eb7c69817b8daa75af3a970
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20180819/2323fba5/attachment-0001.html>


More information about the vc mailing list