IMPORTANT: This repository is not being maintained anymore.
Find PEP 8 issues in python files.
$ gem install danger-pep8
Add the following line to your Gemfile and then run bundle install
:
gem 'danger-pep8'
Check for issues running the script from current directory. Prints a markdown table with all issues found:
pep8.lint
Changes root folder from where script is running:
pep8.base_dir = "src"
pep8.lint
pep8.lint(use_inline_comments=true)
If you need to specify a different configuration file, use the config_file
parameter below. Check this link for more information about Configuration Locations.
pep8.config_file = ".flake8_ci"
pep8.lint
Adds an entry onto the warnings/failures table:
pep8.count_errors
Warns if number of issues is greater than a given threshold:
pep8.threshold = 10
pep8.count_errors
Fails if number of issues is greater than a given threshold:
pep8.threshold = 10
pep8.count_errors(should_fail = true)
bundle install
to setup dependencies.bundle exec rake spec
to run the tests.bundle exec guard
to automatically have tests run as you make changes.MIT