pep8: upate to 1.7.0
This commit is contained in:
parent
30d254983d
commit
544f2674ec
2 changed files with 9 additions and 77 deletions
|
@ -1,73 +0,0 @@
|
||||||
From 435d1cbf995a659a82d1d4b42d25e3459556ef21 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ian Lee <IanLee1521@gmail.com>
|
|
||||||
Date: Tue, 17 Mar 2015 21:52:23 -0700
|
|
||||||
Subject: [PATCH] Reverted fix for #368 which had unintended repurcussions in
|
|
||||||
flake8 and other places.
|
|
||||||
|
|
||||||
This fix reverts to the parsing of user config (~/.config/pep8), then local directory
|
|
||||||
config files, and finally overrides with cli options as was the behavior back in 1.5.7
|
|
||||||
---
|
|
||||||
CHANGES.txt | 6 ++++++
|
|
||||||
pep8.py | 28 ++++++++++++++--------------
|
|
||||||
2 files changed, 20 insertions(+), 14 deletions(-)
|
|
||||||
|
|
||||||
diff --git CHANGES.txt.orig CHANGES.txt
|
|
||||||
index 85eb043..5499abd 100644
|
|
||||||
--- CHANGES.txt.orig
|
|
||||||
+++ CHANGES.txt
|
|
||||||
@@ -5,6 +5,12 @@ Changelog
|
|
||||||
1.6.x (unreleased)
|
|
||||||
------------------
|
|
||||||
|
|
||||||
+Changes:
|
|
||||||
+
|
|
||||||
+* Reverted the fix in #368, "options passed on command line are only ones
|
|
||||||
+ accepted" feature. This has many unintended consequences in pep8 and flake8
|
|
||||||
+ and needs to be reworked when I have more time.
|
|
||||||
+
|
|
||||||
1.6.2 (2015-02-15)
|
|
||||||
------------------
|
|
||||||
|
|
||||||
diff --git pep8.py.orig pep8.py
|
|
||||||
index 9f40381..4d993da 100755
|
|
||||||
--- pep8.py.orig
|
|
||||||
+++ pep8.py
|
|
||||||
@@ -1984,24 +1984,24 @@ def read_config(options, args, arglist, parser):
|
|
||||||
|
|
||||||
local_dir = os.curdir
|
|
||||||
|
|
||||||
+ if USER_CONFIG and os.path.isfile(USER_CONFIG):
|
|
||||||
+ if options.verbose:
|
|
||||||
+ print('user configuration: %s' % USER_CONFIG)
|
|
||||||
+ config.read(USER_CONFIG)
|
|
||||||
+
|
|
||||||
+ parent = tail = args and os.path.abspath(os.path.commonprefix(args))
|
|
||||||
+ while tail:
|
|
||||||
+ if config.read(os.path.join(parent, fn) for fn in PROJECT_CONFIG):
|
|
||||||
+ local_dir = parent
|
|
||||||
+ if options.verbose:
|
|
||||||
+ print('local configuration: in %s' % parent)
|
|
||||||
+ break
|
|
||||||
+ (parent, tail) = os.path.split(parent)
|
|
||||||
+
|
|
||||||
if cli_conf and os.path.isfile(cli_conf):
|
|
||||||
if options.verbose:
|
|
||||||
print('cli configuration: %s' % cli_conf)
|
|
||||||
config.read(cli_conf)
|
|
||||||
- else:
|
|
||||||
- if USER_CONFIG and os.path.isfile(USER_CONFIG):
|
|
||||||
- if options.verbose:
|
|
||||||
- print('user configuration: %s' % USER_CONFIG)
|
|
||||||
- config.read(USER_CONFIG)
|
|
||||||
-
|
|
||||||
- parent = tail = args and os.path.abspath(os.path.commonprefix(args))
|
|
||||||
- while tail:
|
|
||||||
- if config.read(os.path.join(parent, fn) for fn in PROJECT_CONFIG):
|
|
||||||
- local_dir = parent
|
|
||||||
- if options.verbose:
|
|
||||||
- print('local configuration: in %s' % parent)
|
|
||||||
- break
|
|
||||||
- (parent, tail) = os.path.split(parent)
|
|
||||||
|
|
||||||
pep8_section = parser.prog
|
|
||||||
if config.has_section(pep8_section):
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'pep8'
|
# Template file for 'pep8'
|
||||||
pkgname=pep8
|
pkgname=pep8
|
||||||
version=1.6.2
|
version=1.7.0
|
||||||
revision=2
|
revision=1
|
||||||
noarch=yes
|
noarch=yes
|
||||||
build_style=python-module
|
build_style=python-module
|
||||||
hostmakedepends="python-setuptools"
|
hostmakedepends="python-setuptools"
|
||||||
|
@ -9,7 +9,12 @@ depends="${hostmakedepends}"
|
||||||
pycompile_module="pep8.py"
|
pycompile_module="pep8.py"
|
||||||
short_desc="Python style guide checker"
|
short_desc="Python style guide checker"
|
||||||
maintainer="Alessio Sergi <al3hex@gmail.com>"
|
maintainer="Alessio Sergi <al3hex@gmail.com>"
|
||||||
homepage="https://github.com/jcrocholl/pep8"
|
homepage="https://github.com/PyCQA/pep8"
|
||||||
license="MIT"
|
license="MIT"
|
||||||
distfiles="${PYPI_SITE}/p/pep8/pep8-${version}.tar.gz"
|
distfiles="${PYPI_SITE}/p/pep8/pep8-${version}.tar.gz"
|
||||||
checksum=b8b7e35630b5539e26a197dfc6005be9e1e9a135496b377723a8ebc01b9bcbff
|
checksum=a113d5f5ad7a7abacef9df5ec3f2af23a20a28005921577b15dd584d099d5900
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
sed -n '/Copyright/,/SOFTWARE\./p' pep8.py >LICENSE
|
||||||
|
vlicense LICENSE
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue