pronto-flake8 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b02e7d8f6c72bc1ed71e6adb5dfafee984b64a61
4
- data.tar.gz: 5956afd0f9b9095ed8342608a6ffa14155c04961
3
+ metadata.gz: 1a44a243db2ec19ea260dd189107a92b2704883d
4
+ data.tar.gz: b0eb242faa7d1ac2617ab34aeeed2aa0c65a42c1
5
5
  SHA512:
6
- metadata.gz: 28502d25155d8d0601aa9bbea278832fd5199f03d0788b0f5b0687740ccfddbdd3fd88e364e3031810d33795cea13159ceee0547e86d129a00a5f4a1400f8f23
7
- data.tar.gz: 387928960cd2d0971cc867cfdbb098797e7c7ea20c612333cfaf66312a3c24a6cfe226697d8a84714f9b8d09829726bcaf9738505757fed1292890d5f496cd36
6
+ metadata.gz: fcba1da6354948e87e49597707ad62d91547d87a4c2aabb9314bcce1c26e1c77be8a787da64f8048c08757ed4d5605c6e5c04f56c79df9f252d5c25ae4a10e8c
7
+ data.tar.gz: bbd00d090957b667f1a6893bbd341f487895db9b1df2a03f72f5b5413db736f3b35bcdddf57905533b2eef299879528b6970e719c78899a96c1cdd8d788cbd54
data/README.md CHANGED
@@ -1,4 +1,10 @@
1
- # [Pre-Alpha] Pronto runner for flake8
1
+ # Pronto runner for flake8
2
+ [![Gem Version](https://badge.fury.io/rb/pronto-flake8.svg)](http://badge.fury.io/rb/pronto-flake8)
3
+ [![Build Status](https://travis-ci.org/scoremedia/pronto-flake8.svg?branch=master)](https://travis-ci.org/scoremedia/pronto-flake8)
4
+ [![Code Climate](https://codeclimate.com/github/scoremedia/pronto-flake8/badges/gpa.svg)](https://codeclimate.com/github/scoremedia/pronto-flake8)
5
+ [![Test Coverage](https://codeclimate.com/github/scoremedia/pronto-flake8/badges/coverage.svg)](https://codeclimate.com/github/scoremedia/pronto-flake8/coverage)
6
+ [![Dependency Status](https://gemnasium.com/badges/github.com/scoremedia/pronto-flake8.svg)](https://gemnasium.com/github.com/scoremedia/pronto-flake8)
7
+
2
8
 
3
9
  Pronto runner for [flake8](http://flake8.pycqa.org/en/latest/), a Python Style Guide Enforcer. [What is Pronto?](https://github.com/mmozuras/pronto)
4
10
 
@@ -23,3 +29,44 @@ Example configuration to call custom flake8 executable:
23
29
  # .pronto_flake8.yml
24
30
  flake8_executable: '/my/custom/path/flake8'
25
31
  ```
32
+
33
+ ## Contribution Guidelines
34
+ ### Installation
35
+ `git clone` this repo and `cd pronto-flake8`
36
+
37
+
38
+
39
+ Ruby
40
+ ```sh
41
+ brew install cmake # or your OS equivalent
42
+ brew install rbenv # or your OS equivalent
43
+ rbenv install 2.4.5
44
+ rbenv global 2.4.5 # or make it project specific
45
+ gem install bundle
46
+ gem install pronto
47
+ bundle install
48
+ ```
49
+
50
+ Python
51
+ ```sh
52
+
53
+ virtualenv venv # tested on Python 3.6
54
+ source venv/bin/activate
55
+ pip install -r requirements.txt
56
+ ```
57
+
58
+ Make your changes
59
+ ```sh
60
+ git checkout -b <new_feature>
61
+ # make your changes
62
+ bundle exec rspec
63
+ gem build pronto-flake8.gemspec
64
+ gem install pronto-flake8-<current_version>.gem # get current version from previous command
65
+ uncomment the line in dummy_package/dummy.py
66
+ pronto run --unstaged
67
+ ```
68
+
69
+ It should show
70
+ ```sh
71
+ dummy_package/dummy.py:1 E: E731 do not assign a lambda expression, use a def
72
+ ```
@@ -1,5 +1,5 @@
1
1
  module Pronto
2
2
  module Flake8Version
3
- VERSION = '0.1.0'.freeze
3
+ VERSION = '0.2.0'.freeze
4
4
  end
5
5
  end
data/lib/pronto/flake8.rb CHANGED
@@ -64,7 +64,7 @@ module Pronto
64
64
  python_files = filter_python_files(files)
65
65
  file_paths_str = python_files.join(' ')
66
66
  if !file_paths_str.empty?
67
- parse_output `#{flake8_executable} #{file_paths_str}`
67
+ parse_output `#{flake8_executable} --format=default #{file_paths_str}`
68
68
  else
69
69
  []
70
70
  end
@@ -73,7 +73,7 @@ module Pronto
73
73
 
74
74
  def filter_python_files(all_files)
75
75
  all_files.select { |file_path| file_path.to_s.end_with? PYTHON_FILE_EXTENSION}
76
- .map { |py_file| py_file.to_s.shellescape }
76
+ .map { |py_file| py_file.to_s.shellescape }
77
77
  end
78
78
 
79
79
  def parse_output(executable_output)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pronto-flake8
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajiv Abraham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-11 00:00:00.000000000 Z
11
+ date: 2018-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pronto
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  requirements:
106
106
  - flake8 (in PATH)
107
107
  rubyforge_project:
108
- rubygems_version: 2.6.13
108
+ rubygems_version: 2.6.14.3
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: Pronto runner for flake8.