Gentoo Archives: gentoo-catalyst

From: Brian Dolbec <dolsen@g.o>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] [PATCH 13/13] lint: clean up superfluous parens
Date: Tue, 06 Oct 2015 15:28:46
Message-Id: 20151006082747.2f3fb6ec.dolsen@gentoo.org
In Reply to: [gentoo-catalyst] [PATCH 13/13] lint: clean up superfluous parens by Mike Frysinger
1 On Tue, 6 Oct 2015 11:05:29 -0400
2 Mike Frysinger <vapier@g.o> wrote:
3
4 > These don't need the parens, so omit them.
5 >
6 > In the case of setup.py, we were expecting a print function, not a
7 > keyword, so make sure to import that module.
8 > ---
9 > catalyst/lock.py | 6 +++---
10 > doc/make_subarch_table_guidexml.py | 6 +++---
11 > setup.py | 1 +
12 > 3 files changed, 7 insertions(+), 6 deletions(-)
13 >
14 > diff --git a/catalyst/lock.py b/catalyst/lock.py
15 > index d079b2d..3d50c06 100644
16 > --- a/catalyst/lock.py
17 > +++ b/catalyst/lock.py
18 > @@ -179,7 +179,7 @@ class LockDir(object):
19 > if not os.path.exists(self.lockfile):
20 > print "lockfile does not exist '%s'" %
21 > self.lockfile #print "fcntl_unlock() , self.myfd:", self.myfd,
22 > type(self.myfd)
23 > - if (self.myfd != None):
24 > + if self.myfd != None:
25 > #print "fcntl_unlock() trying to
26 > close it " try:
27 > os.close(self.myfd)
28 > @@ -236,7 +236,7 @@ class LockDir(object):
29 > #if type(lockfilename) ==
30 > types.StringType: # os.close(myfd)
31 > #print "fcntl_unlock() trying a last ditch close",
32 > self.myfd
33 > - if (self.myfd != None):
34 > + if self.myfd != None:
35 > os.close(self.myfd)
36 > self.myfd=None
37 > self.locked=False
38 > @@ -256,7 +256,7 @@ class LockDir(object):
39 > start_time = time.time()
40 > reported_waiting = False
41 >
42 > - while(time.time() < (start_time + max_wait)):
43 > + while time.time() < (start_time + max_wait):
44 > # We only need it to exist.
45 > self.myfd = os.open(self.myhardlock,
46 > os.O_CREAT|os.O_RDWR,0660) os.close(self.myfd)
47 > diff --git a/doc/make_subarch_table_guidexml.py
48 > b/doc/make_subarch_table_guidexml.py index 54e0a4a..a6a9022 100755
49 > --- a/doc/make_subarch_table_guidexml.py
50 > +++ b/doc/make_subarch_table_guidexml.py
51 > @@ -30,7 +30,7 @@ def handle_line(line, subarch_title_to_subarch_id,
52 > subarch_id_to_pattern_arch_ge # Apply alias grouping
53 > arch = _pattern_arch_genericliases.get(arch, arch)
54 >
55 > - assert(subarch not in
56 > subarch_id_to_pattern_arch_genericrch_id)
57 > + assert subarch not in
58 > subarch_id_to_pattern_arch_genericrch_id
59 > subarch_id_to_pattern_arch_genericrch_id[subarch] = arch
60 > return
61 > @@ -40,7 +40,7 @@ def handle_line(line, subarch_title_to_subarch_id,
62 > subarch_id_to_pattern_arch_ge child_subarch = x.group(1)
63 > parent_subarch = x.group(2)
64 >
65 > - assert(child_subarch not in
66 > subarch_id_to_pattern_arch_genericrch_id)
67 > + assert child_subarch not in
68 > subarch_id_to_pattern_arch_genericrch_id
69 > subarch_id_to_pattern_arch_genericrch_id[child_subarch] =
70 > subarch_id_to_pattern_arch_genericrch_id[parent_subarch] return
71 > @@ -49,7 +49,7 @@ def handle_line(line, subarch_title_to_subarch_id,
72 > subarch_id_to_pattern_arch_ge subarch_title = x.group(1)
73 > subarch_id = x.group(2)
74 >
75 > - assert(subarch_title not in
76 > subarch_title_to_subarch_id)
77 > + assert subarch_title not in
78 > subarch_title_to_subarch_id
79 > subarch_title_to_subarch_id[subarch_title] = subarch_id
80 >
81 > diff --git a/setup.py b/setup.py
82 > index e4569ee..a875db1 100755
83 > --- a/setup.py
84 > +++ b/setup.py
85 > @@ -1,5 +1,6 @@
86 > """Catalyst is a release building tool used by Gentoo Linux"""
87 >
88 > +from __future__ import print_function
89 >
90 > import codecs as _codecs
91 > from distutils.core import setup as _setup, Command as _Command
92
93 I'll just reply to this last one.
94
95
96 All patches in this series look good, Thank you.
97
98 --
99 Brian Dolbec <dolsen>