[Git][NTPsec/ntpsec][master] 2 commits: pylint: import print_function from future for python2/3

Matt Selsky gitlab at mg.gitlab.com
Sat Aug 19 14:55:00 UTC 2017


Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
60ad0a67 by Matt Selsky at 2017-08-19T14:34:05+00:00
pylint: import print_function from future for python2/3

************* Module ntplogtemp
C:302, 0: Unnecessary parens after u'print' keyword (superfluous-parens)
************* Module ntpheatusb
C: 61, 0: Unnecessary parens after 'print' keyword (superfluous-parens)
C: 66, 0: Unnecessary parens after 'print' keyword (superfluous-parens)
C:225, 0: Unnecessary parens after 'print' keyword (superfluous-parens)
C:229, 0: Unnecessary parens after 'print' keyword (superfluous-parens)
C:267, 0: Unnecessary parens after 'print' keyword (superfluous-parens)
C:268, 0: Unnecessary parens after 'print' keyword (superfluous-parens)
C:274, 0: Unnecessary parens after 'print' keyword (superfluous-parens)
C:283, 0: Unnecessary parens after 'print' keyword (superfluous-parens)
************* Module cpu-temp-log
C: 53, 0: Unnecessary parens after u'print' keyword (superfluous-parens)

- - - - -
9073d1e0 by Matt Selsky at 2017-08-19T14:41:41+00:00
pylint: remove unnecessary parenthesis

************* Module ntpq
C:1024, 0: Unnecessary parens after u'if' keyword (superfluous-parens)
C:1061, 0: Unnecessary parens after u'if' keyword (superfluous-parens)
************* Module ntpheatusb
C: 97, 0: Unnecessary parens after 'return' keyword (superfluous-parens)

- - - - -


4 changed files:

- contrib/cpu-temp-log
- contrib/ntpheatusb
- ntpclients/ntplogtemp
- ntpclients/ntpq


Changes:

=====================================
contrib/cpu-temp-log
=====================================
--- a/contrib/cpu-temp-log
+++ b/contrib/cpu-temp-log
@@ -36,6 +36,7 @@ temperatures will be hardware specific.
 
 """
 
+from __future__ import print_function, division
 
 import sys
 import re


=====================================
contrib/ntpheatusb
=====================================
--- a/contrib/ntpheatusb
+++ b/contrib/ntpheatusb
@@ -26,6 +26,8 @@
 #
 # More info on the blog post: https://blog.ntpsec.org/2017/03/21/More_Heat.html
 
+from __future__ import print_function, division
+
 import argparse
 import atexit
 import subprocess
@@ -92,7 +94,7 @@ Discrete PID control
         self.error = 0.0
 
     def __repr__(self):
-        return ("D_value=%s, I_value=%s" % (self.D_value, self.I_value))
+        return "D_value=%s, I_value=%s" % (self.D_value, self.I_value)
 
     def setPoint(self, set_point):
             """


=====================================
ntpclients/ntplogtemp
=====================================
--- a/ntpclients/ntplogtemp
+++ b/ntpclients/ntplogtemp
@@ -19,6 +19,8 @@ optional arguments:
 See the manual page for details.
 """
 
+from __future__ import print_function, division
+
 import argparse
 import glob
 import logging


=====================================
ntpclients/ntpq
=====================================
--- a/ntpclients/ntpq
+++ b/ntpclients/ntpq
@@ -1021,7 +1021,7 @@ usage: writevar assocID name=value,[...]
         if not idrange:
             return
         for associd in idrange:
-            if (associd != idrange[0]):
+            if associd != idrange[0]:
                 self.say("\n")
             if not self.__dolist(self.uservars,
                                  associd, ntp.control.CTL_OP_READVAR,
@@ -1058,7 +1058,7 @@ usage: mrl assocIDlow assocIDhigh
             return
         varlist = line.split()[2:]
         for associd in idrange:
-            if (associd != idrange[0]):
+            if associd != idrange[0]:
                 self.say("\n")
             if not self.__dolist(varlist, associd,
                                  ntp.control.CTL_OP_READVAR,



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/6358daa256b5bffb132ed785f88a23214df97072...9073d1e0033d803742cc9fb51b12c43997242e15

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/6358daa256b5bffb132ed785f88a23214df97072...9073d1e0033d803742cc9fb51b12c43997242e15
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/20170819/50b5636f/attachment.html>


More information about the vc mailing list