Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/catalyst:master commit in: /, catalyst/
Date: Tue, 06 Oct 2015 13:46:39
Message-Id: 1444104834.67508235581c2964907d81d67367ec6efbfa619d.vapier@gentoo
1 commit: 67508235581c2964907d81d67367ec6efbfa619d
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 6 04:13:54 2015 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 6 04:13:54 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=67508235
7
8 lint: clean up global statement warnings
9
10 Delete unused calls and add disables for the ones we actively want. We
11 generally want to avoid calls to "global" so force people to disable the
12 warning whenever they try to use it.
13
14 catalyst/support.py | 2 --
15 catalyst/version.py | 2 ++
16 setup.py | 3 ++-
17 3 files changed, 4 insertions(+), 3 deletions(-)
18
19 diff --git a/catalyst/support.py b/catalyst/support.py
20 index a879eaf..1e3eeef 100644
21 --- a/catalyst/support.py
22 +++ b/catalyst/support.py
23 @@ -294,8 +294,6 @@ def ismount(path):
24
25 def addl_arg_parse(myspec,addlargs,requiredspec,validspec):
26 "helper function to help targets parse additional arguments"
27 - global valid_config_file_values
28 -
29 messages = []
30 for x in addlargs.keys():
31 if x not in validspec and x not in valid_config_file_values and x not in requiredspec:
32
33 diff --git a/catalyst/version.py b/catalyst/version.py
34 index d5c5cde..5deb4d7 100644
35 --- a/catalyst/version.py
36 +++ b/catalyst/version.py
37 @@ -18,6 +18,7 @@ _ver = None
38
39 def get_git_version(version=__version__):
40 """Return: a string describing our version."""
41 + # pylint: disable=global-statement
42 global _ver
43 cwd = os.path.dirname(os.path.abspath(__file__))
44 version_info = get_ver(cwd)
45 @@ -39,6 +40,7 @@ def get_version(reset=False):
46 '''Returns a saved release version string or the
47 generated git release version.
48 '''
49 + # pylint: disable=global-statement
50 global __version__, _ver
51 if _ver and not reset:
52 return _ver
53
54 diff --git a/setup.py b/setup.py
55 index 27ed2de..e4569ee 100755
56 --- a/setup.py
57 +++ b/setup.py
58 @@ -55,7 +55,6 @@ _data_files.extend(_files('share/catalyst/targets', 'targets'))
59 class set_version(_Command):
60 '''Saves the specified release version information
61 '''
62 - global __version__
63 description = "hardcode script's version using VERSION from environment"
64 user_options = [] # [(long_name, short_name, desc),]
65
66 @@ -66,6 +65,8 @@ class set_version(_Command):
67 pass
68
69 def run(self):
70 + # pylint: disable=global-statement
71 + global __version__
72 try:
73 version = _os.environ['VERSION']
74 except KeyError: