Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed script file to import correctly from pep257.py #93

Merged
merged 1 commit into from Jan 9, 2015
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

8 pep257
@@ -1,10 +1,6 @@
#! /usr/bin/env python
import sys
from pep257 import main, parse_options
from pep257 import main


if __name__ == '__main__':
try:
sys.exit(main(*parse_options()))
except KeyboardInterrupt:
pass
main()
@@ -545,7 +545,7 @@ def setup_stream_handler(options):
log.addHandler(stream_handler)


def main():
def run_pep257():
opt_parser = get_option_parser()
# setup the logger before parsing the config file, so that command line
# arguments for debug / verbose will be printed.
@@ -883,8 +883,12 @@ def SKIP_check_return_type(self, function, docstring):
return Error()


if __name__ == '__main__':
def main():
try:
sys.exit(main())
sys.exit(run_pep257())
except KeyboardInterrupt:
pass


if __name__ == '__main__':
main()
@@ -48,8 +48,8 @@ def open(self, path, *args, **kwargs):

def invoke_pep257(self, args=""):
"""Run pep257.py on the environment base folder with the given args."""
pep257_location = os.path.join(os.path.dirname(__file__), 'pep257.py')
cmd = shlex.split("python {0} {1} {2}"
pep257_location = os.path.join(os.path.dirname(__file__), 'pep257')
cmd = shlex.split("{0} {1} {2}"
.format(pep257_location, self.tempdir, args))
p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.