Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

Commit e9b8bcf

Browse files
committed
Make pylint happy
1 parent 991a52e commit e9b8bcf

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

tools/genmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ def main(args):
8686
[recipe % (modname, ar_name, pkg_dir)])
8787
go_package = '__python__/' + basename.replace(os.sep, '/')
8888
recipe = 'go tool compile -o $@ -p {} -complete -I {} -pack $<'
89-
_PrintRule(ar_name, [go_file, gotest_file], [recipe.format(go_package, pkg_dir)])
89+
_PrintRule(ar_name, [go_file, gotest_file],
90+
[recipe.format(go_package, pkg_dir)])
9091
if args.all_target:
9192
_PrintRule(args.all_target, [ar_name], [])
9293
print '-include {}\n'.format(dep_file)

tools/gentest

+3-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ import textwrap
2626
from grumpy.compiler import imputil
2727

2828
parser = argparse.ArgumentParser()
29-
parser.add_argument('-modname', help='Module to generate a _test.go file to', required=True)
29+
parser.add_argument('-modname', required=True,
30+
help='Module to generate a _test.go file to')
3031

3132

3233
template = textwrap.dedent("""
@@ -68,7 +69,6 @@ def main(args):
6869

6970
script = os.path.join(py_dir, '%s.py' % modname)
7071
gopath = gopath + os.pathsep + workdir
71-
package = _package_name(modname)
7272

7373
if not os.path.isfile(script):
7474
return # The script does not exist. And is OK!
@@ -77,8 +77,7 @@ def main(args):
7777

7878
# Find the script associated with the given module.
7979
for d in gopath.split(os.pathsep):
80-
script = imputil.find_script(
81-
os.path.join(d, 'src', '__python__'), modname)
80+
script = imputil.find_script(os.path.join(d, 'src', '__python__'), modname)
8281
if script:
8382
break
8483
else:

tools/grumpc

+4-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ from grumpy import pythonparser
3535
parser = argparse.ArgumentParser()
3636
parser.add_argument('script', help='Python source filename')
3737
parser.add_argument('-modname', default='__main__', help='Python module name')
38-
parser.add_argument('-output', default=None, help='Golang output file path (defaults to stdout)')
39-
parser.add_argument('-astest', default=False, action='store_true', help='Output as a test suite.')
38+
parser.add_argument('-output', default=None,
39+
help='Golang output file path (defaults to stdout)')
40+
parser.add_argument('-astest', default=False, action='store_true',
41+
help='Output as a test suite.')
4042

4143

4244
def main(args):

tools/grumprun

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ Usage: $ grumprun -m <module> # Run the named module.
2323
import argparse
2424
import os
2525
import random
26-
import shutil
2726
import string
2827
import subprocess
2928
import sys

0 commit comments

Comments
 (0)