0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
A Danger plugin for Python's PEP 8.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 2.14
= 3.0.7
>= 0
~> 10.0
~> 3.4
~> 0.49.0
~> 0.9.11

Runtime

 Project Readme

CircleCI

IMPORTANT: This repository is not being maintained anymore.

danger-pep8

Find PEP 8 issues in python files.

Installation

Via global gems

$ gem install danger-pep8

Via Bundler

Add the following line to your Gemfile and then run bundle install:

gem 'danger-pep8'

Usage

Basic

Check for issues running the script from current directory. Prints a markdown table with all issues found:

pep8.lint

Advanced

Running from a custom directory

Changes root folder from where script is running:

pep8.base_dir = "src"
pep8.lint

Use GitHub's inline comments instead of a markdown table

pep8.lint(use_inline_comments=true)

Running using a configuration file different than the usual

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

Printing a warning message with number of errors

Adds an entry onto the warnings/failures table:

pep8.count_errors

Defining a threshold of max 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)

Development

  1. Clone this repo
  2. Run bundle install to setup dependencies.
  3. Run bundle exec rake spec to run the tests.
  4. Use bundle exec guard to automatically have tests run as you make changes.
  5. Make your changes.

License

MIT