[Git][NTPsec/ntpsec][master] Clean up pyflakes warning about imported, but unused modules.
Eric S. Raymond
gitlab at mg.gitlab.com
Wed Dec 7 08:26:29 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
ea36350b by Matt Selsky at 2016-12-07T02:23:06-05:00
Clean up pyflakes warning about imported, but unused modules.
Mostly modules appear to be entirely unused, but some functions take an object
as their first argument and we were using obj->func(...) instead of func(obj,
...) and the former confuses pyflakes.
attic/wscript:1: 'waflib.Utils' imported but unused
ntpfrob/wscript:1: 'waflib.Utils' imported but unused
ntptime/wscript:1: 'waflib.Utils' imported but unused
wafhelpers/configure.py:4: 'waflib.Configure.conf' imported but unused
wafhelpers/configure.py:155: 'wafhelpers.check_type.check_type' imported but unused
wafhelpers/configure.py:156: 'wafhelpers.check_sizeof.check_sizeof' imported but unused
wafhelpers/configure.py:157: 'wafhelpers.check_structfield.check_structfield' imported but unused
wafhelpers/waf.py:2: 'waflib.TaskGen.extension' imported but unused
wafhelpers/waf.py:2: 'waflib.TaskGen.after' imported but unused
wafhelpers/waf.py:2: 'waflib.TaskGen.after_method' imported but unused
wafhelpers/waf.py:2: 'waflib.TaskGen.before' imported but unused
- - - - -
5 changed files:
- attic/wscript
- ntpfrob/wscript
- ntptime/wscript
- wafhelpers/configure.py
- wafhelpers/waf.py
Changes:
=====================================
attic/wscript
=====================================
--- a/attic/wscript
+++ b/attic/wscript
@@ -1,5 +1,3 @@
-from waflib import Utils
-
def build(ctx):
bldnode = ctx.bldnode.abspath()
=====================================
ntpfrob/wscript
=====================================
--- a/ntpfrob/wscript
+++ b/ntpfrob/wscript
@@ -1,5 +1,3 @@
-from waflib import Utils
-
def build(ctx):
srcnode = ctx.srcnode.abspath()
bldnode = ctx.bldnode.abspath()
=====================================
ntptime/wscript
=====================================
--- a/ntptime/wscript
+++ b/ntptime/wscript
@@ -1,5 +1,3 @@
-from waflib import Utils
-
def build(ctx):
if ctx.env.HEADER_SYS_TIMEX_H:
srcnode = ctx.srcnode.abspath()
=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -1,7 +1,6 @@
from __future__ import print_function
import sys, os, platform
-from waflib.Configure import conf
from wafhelpers.probes import probe_header_with_prerequisites, probe_function_with_prerequisites
from wafhelpers.util import msg, msg_setting
@@ -240,21 +239,21 @@ def cmd_configure(ctx, config):
types = ["uint64_t"]
for inttype in sorted(types):
- ctx.check_type(inttype, ["stdint.h", "sys/types.h"])
+ check_type(ctx, inttype, ["stdint.h", "sys/types.h"])
net_types = (
("struct if_laddrconf", ["sys/types.h", "net/if6.h"]),
("struct if_laddrreq", ["sys/types.h", "net/if6.h"]),
)
for (f, h) in net_types:
- ctx.check_type(f, h)
+ check_type(ctx, f, h)
structures = (
("struct timex", ["sys/time.h", "sys/timex.h"]),
("struct ntptimeval", ["sys/time.h", "sys/timex.h"]),
)
for (s, h) in structures:
- ctx.check_type(s, h)
+ check_type(ctx, s, h)
structure_fields = (
("time_tick", "timex", ["sys/time.h", "sys/timex.h"]),
@@ -263,7 +262,7 @@ def cmd_configure(ctx, config):
("tai", "ntptimeval", ["sys/time.h", "sys/timex.h"]),
)
for (f, s, h) in structure_fields:
- ctx.check_structfield(f, s, h)
+ check_structfield(ctx, f, s, h)
# mostly used by timetoa.h and timespecops.h
sizeofs = [
@@ -274,7 +273,7 @@ def cmd_configure(ctx, config):
]
for header, sizeof in sorted(sizeofs, key=lambda x: x[1:]):
- ctx.check_sizeof(header, sizeof)
+ check_sizeof(ctx, header, sizeof)
# The protocol major number
ctx.define("NTP_API", 4, comment="Protocol major number.")
=====================================
wafhelpers/waf.py
=====================================
--- a/wafhelpers/waf.py
+++ b/wafhelpers/waf.py
@@ -1,5 +1,5 @@
from waflib.Configure import conf
-from waflib.TaskGen import feature, before, after, extension, after_method, before_method
+from waflib.TaskGen import feature, before_method
from waflib.Task import Task
import os
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/ea36350be57c5251baa2bf5e21d4420a973d84d0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161207/7370a45b/attachment.html>
More information about the vc
mailing list