pronto-flake8 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +48 -1
- data/lib/pronto/flake8/version.rb +1 -1
- data/lib/pronto/flake8.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a44a243db2ec19ea260dd189107a92b2704883d
|
4
|
+
data.tar.gz: b0eb242faa7d1ac2617ab34aeeed2aa0c65a42c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcba1da6354948e87e49597707ad62d91547d87a4c2aabb9314bcce1c26e1c77be8a787da64f8048c08757ed4d5605c6e5c04f56c79df9f252d5c25ae4a10e8c
|
7
|
+
data.tar.gz: bbd00d090957b667f1a6893bbd341f487895db9b1df2a03f72f5b5413db736f3b35bcdddf57905533b2eef299879528b6970e719c78899a96c1cdd8d788cbd54
|
data/README.md
CHANGED
@@ -1,4 +1,10 @@
|
|
1
|
-
#
|
1
|
+
# Pronto runner for flake8
|
2
|
+
[](http://badge.fury.io/rb/pronto-flake8)
|
3
|
+
[](https://travis-ci.org/scoremedia/pronto-flake8)
|
4
|
+
[](https://codeclimate.com/github/scoremedia/pronto-flake8)
|
5
|
+
[](https://codeclimate.com/github/scoremedia/pronto-flake8/coverage)
|
6
|
+
[](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
|
+
```
|
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.
|
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:
|
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.
|
108
|
+
rubygems_version: 2.6.14.3
|
109
109
|
signing_key:
|
110
110
|
specification_version: 4
|
111
111
|
summary: Pronto runner for flake8.
|