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

Commit

Permalink
Make pylint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
alanjds committed Dec 13, 2017
1 parent 991a52e commit e9b8bcf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion tools/genmake
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ def main(args):
[recipe % (modname, ar_name, pkg_dir)])
go_package = '__python__/' + basename.replace(os.sep, '/')
recipe = 'go tool compile -o $@ -p {} -complete -I {} -pack $<'
_PrintRule(ar_name, [go_file, gotest_file], [recipe.format(go_package, pkg_dir)])
_PrintRule(ar_name, [go_file, gotest_file],
[recipe.format(go_package, pkg_dir)])
if args.all_target:
_PrintRule(args.all_target, [ar_name], [])
print '-include {}\n'.format(dep_file)
Expand Down
7 changes: 3 additions & 4 deletions tools/gentest
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import textwrap
from grumpy.compiler import imputil

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


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

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

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

# Find the script associated with the given module.
for d in gopath.split(os.pathsep):
script = imputil.find_script(
os.path.join(d, 'src', '__python__'), modname)
script = imputil.find_script(os.path.join(d, 'src', '__python__'), modname)
if script:
break
else:
Expand Down
6 changes: 4 additions & 2 deletions tools/grumpc
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ from grumpy import pythonparser
parser = argparse.ArgumentParser()
parser.add_argument('script', help='Python source filename')
parser.add_argument('-modname', default='__main__', help='Python module name')
parser.add_argument('-output', default=None, help='Golang output file path (defaults to stdout)')
parser.add_argument('-astest', default=False, action='store_true', help='Output as a test suite.')
parser.add_argument('-output', default=None,
help='Golang output file path (defaults to stdout)')
parser.add_argument('-astest', default=False, action='store_true',
help='Output as a test suite.')


def main(args):
Expand Down
1 change: 0 additions & 1 deletion tools/grumprun
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Usage: $ grumprun -m <module> # Run the named module.
import argparse
import os
import random
import shutil
import string
import subprocess
import sys
Expand Down

0 comments on commit e9b8bcf

Please sign in to comment.