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

Improve code style (PEP8) of {{cookiecutter.repo_name}}/ci scripts. #62

Merged
merged 1 commit into from
Jul 27, 2016

Conversation

tantale
Copy link

@tantale tantale commented May 27, 2016

The generated ci scripts appears to have some awkwardness:

  • too broad exception catching (when calling check_output or check_call).
  • PEP8 warnings: order of imports, newlines.
  • local variable may not be defined (when checking "coverage_flags" and "environment_variables" in conf).

Also notice that: python ci/bootstrap.py won't work if tox isn't installed globally or in the project's virtualenv, (in my environment, I use an alias for tox). So, I add a warning.

Enjoy.

subprocess.check_call([join(bin_path, "pip"), "install", "jinja2"{% if cookiecutter.test_matrix_configurator == "yes" %}, "matrix"{% endif %}])
activate = join(bin_path, "activate_this.py")
# noinspection PyCompatibility
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what tool uses this directive?

@tantale
Copy link
Author

tantale commented May 27, 2016

PyCharm insert this kind of directive to disable warnings. See: https://www.jetbrains.com/help/pycharm/2016.1/code-inspection.html

@ionelmc ionelmc merged commit a037e14 into ionelmc:master Jul 27, 2016
@ionelmc
Copy link
Owner

ionelmc commented Jul 27, 2016

Alright, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants