Skip to content
Browse files

python-check.sh: Remove in favor of flake8

flake8 combines and improves pyflakes and pep8, so is strictly
better than python-check.sh, as we dropped pylint support a while
ago.

Fixes #57
  • Loading branch information...
1 parent c01a656 commit 5d057bc82ef870bc5dd8e2a30c24f5292c84318e @jorgenschaefer committed
Showing with 7 additions and 38 deletions.
  1. +0 −1 build.sh
  2. +4 −9 elpy.el
  3. +0 −27 python-check.sh
  4. +3 −1 setup.py
View
1 build.sh
@@ -16,7 +16,6 @@ mkdir -p "$BUILDDIR"
install -m 644 elpy.el elpy-refactor.el LICENSE "$BUILDDIR/"
install -m 644 README.md "$BUILDDIR/README"
-install -m 755 python-check.sh "$BUILDDIR/"
cat elpy-pkg.el.in \
| sed -e "s/\\\$VERSION/$VERSION/g" \
> "$BUILDDIR/elpy-pkg.el"
View
13 elpy.el
@@ -283,15 +283,10 @@ using (defalias 'elpy-initialize-variables 'identity)"
;; is disabled, which can cause some confusion.
(add-hook 'python-mode-hook 'elpy-initialize-local-variables)
- ;; Set `python-check-command' to the python-check.sh we ship with
- ;; elpy.
- (let* ((elpy-el (locate-library "elpy"))
- (python-check (when elpy-el
- (concat (file-name-directory elpy-el)
- "python-check.sh"))))
- (when (and python-check
- (file-exists-p python-check))
- (setq python-check-command python-check)))
+ ;; Flymake support using flake8, including warning faces.
+ (when (executable-find "flake8")
+ (set (make-local-variable 'flymake-warning-re) "^W[0-9]")
+ (setq python-check-command "flake8"))
;; `flymake-no-changes-timeout': The original value of 0.5 is too
;; short for Python code, as that will result in the current line to
View
27 python-check.sh
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-if [ -z "$1" ]
-then
- echo "usage: python-check.sh <file-to-check>" >&2
- exit 1
-fi
-
-EXITVALUE=0
-
-for checker in pyflakes pep8
-do
- if which "$checker" &>/dev/null
- then
- echo "*** $checker"
- echo
- "$checker" "$1"
- RV="$?"
- if [ "$EXITVALUE" = "0" ]
- then
- EXITVALUE="$RV"
- fi
- echo
- fi
-done
-
-exit "$EXITVALUE"
View
4 setup.py
@@ -24,7 +24,9 @@
("License :: OSI Approved :: "
"GNU General Public License v3 or later (GPLv3+)"),
"Topic :: Text Editors :: Emacs",
- ])
+ ],
+ requires=["flake8"]
+ )
finally:
os.unlink("README.txt")
try:

0 comments on commit 5d057bc

Please sign in to comment.
Something went wrong with that request. Please try again.