forked from astanin/python-tabulate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable flake8 linting via pre-commit
This should make very easy to enable additional linters without having to change CI jobs or the way user lints. Configuration is mostly copied from tox project itself, with few removals.
- Loading branch information
Showing
15 changed files
with
1,878 additions
and
1,413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
repos: | ||
- repo: https://github.com/python/black | ||
rev: 19.3b0 | ||
hooks: | ||
- id: black | ||
args: [--safe] | ||
language_version: python3 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.2.3 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: flake8 | ||
language_version: python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,14 +11,14 @@ | |
import re | ||
|
||
# strip links from the descripton on the PyPI | ||
if python_version_tuple()[0] >= '3': | ||
if python_version_tuple()[0] >= "3": | ||
LONG_DESCRIPTION = open("README.md", "r", encoding="utf-8").read() | ||
else: | ||
LONG_DESCRIPTION = open("README.md", "r").read() | ||
|
||
# strip Build Status from the PyPI package | ||
try: | ||
if python_version_tuple()[:2] >= ('2', '7'): | ||
if python_version_tuple()[:2] >= ("2", "7"): | ||
status_re = "^Build status\n(.*\n){7}" | ||
LONG_DESCRIPTION = re.sub(status_re, "", LONG_DESCRIPTION, flags=re.M) | ||
except TypeError: | ||
|
@@ -28,35 +28,39 @@ | |
else: | ||
raise | ||
|
||
install_options = os.environ.get("TABULATE_INSTALL","").split(",") | ||
install_options = os.environ.get("TABULATE_INSTALL", "").split(",") | ||
libonly_flags = set(["lib-only", "libonly", "no-cli", "without-cli"]) | ||
if libonly_flags.intersection(install_options): | ||
console_scripts = [] | ||
else: | ||
console_scripts = ['tabulate = tabulate:_main'] | ||
|
||
|
||
setup(name='tabulate', | ||
version='0.8.6', | ||
description='Pretty-print tabular data', | ||
long_description=LONG_DESCRIPTION, | ||
long_description_content_type="text/markdown", | ||
author='Sergey Astanin', | ||
author_email='[email protected]', | ||
url='https://github.com/astanin/python-tabulate', | ||
license='MIT', | ||
classifiers= [ "Development Status :: 4 - Beta", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 2", | ||
"Programming Language :: Python :: 2.7", | ||
"Programming Language :: Python :: 3.3", | ||
"Programming Language :: Python :: 3.4", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
"Topic :: Software Development :: Libraries" ], | ||
py_modules = ['tabulate'], | ||
entry_points = {'console_scripts': console_scripts}, | ||
extras_require = {'widechars': ['wcwidth']}, | ||
test_suite = 'nose.collector') | ||
console_scripts = ["tabulate = tabulate:_main"] | ||
|
||
|
||
setup( | ||
name="tabulate", | ||
version="0.8.6", | ||
description="Pretty-print tabular data", | ||
long_description=LONG_DESCRIPTION, | ||
long_description_content_type="text/markdown", | ||
author="Sergey Astanin", | ||
author_email="[email protected]", | ||
url="https://github.com/astanin/python-tabulate", | ||
license="MIT", | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 2", | ||
"Programming Language :: Python :: 2.7", | ||
"Programming Language :: Python :: 3.3", | ||
"Programming Language :: Python :: 3.4", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
"Topic :: Software Development :: Libraries", | ||
], | ||
py_modules=["tabulate"], | ||
entry_points={"console_scripts": console_scripts}, | ||
extras_require={"widechars": ["wcwidth"]}, | ||
test_suite="nose.collector", | ||
) |
Oops, something went wrong.