Skip to content

Commit

Permalink
Add python/black code formatting with badge
Browse files Browse the repository at this point in the history
The project now uses python/black code formatting.

Signed-off-by: Heikki Laaksonen <laaksonen.heikki.j@gmail.com>
  • Loading branch information
heilaaks committed Jun 16, 2019
1 parent 664a707 commit 1245d57
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 53 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ lint:
$(PYTHON) -m pylint --jobs=0 snippy_tldr/
$(PYTHON) -m pylint --jobs=0 tests/

format:
black snippy_tldr
black tests
black setup.py

clean: clean-build clean-pyc clean-test

clean-all: clean
Expand Down
5 changes: 4 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
|badge-pypiv| |badge-pys| |badge-pyv| |badge-cov| |badge-docs| |badge-build|
|badge-pypiv| |badge-pys| |badge-pyv| |badge-cov| |badge-docs| |badge-build| |badge-black|

Snippy-tldr
===========
Expand Down Expand Up @@ -68,3 +68,6 @@ To import one tldr man page locally, run:

.. |badge-build| image:: https://travis-ci.org/heilaaks/snippy-tldr.svg?branch=master
:target: https://travis-ci.org/heilaaks/snippy-tldr

.. |badge-black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/python/black
96 changes: 44 additions & 52 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,76 +23,68 @@
from setuptools import setup


with io.open('README.rst', mode='r', encoding='utf-8') as infile:
with io.open("README.rst", mode="r", encoding="utf-8") as infile:
README = infile.read()

REQUIRES = (
'requests'
)
REQUIRES = "requests"

EXTRAS_DEVEL = (
"black",
'sphinx==1.8.5 ; python_version<="3.4"',
'sphinx==2.0.1 ; python_version>"3.4"',
'sphinx_rtd_theme==0.4.3'
"sphinx_rtd_theme==0.4.3",
)

EXTRAS_TEST = (
'flake8==3.7.7',
'pluggy==0.11.0',
"flake8==3.7.7",
"pluggy==0.11.0",
'pylint==1.9.4 ; python_version=="2.7.*"',
'pylint==2.3.1 ; python_version>"2.7"',
'pytest==4.5.0',
'pytest-cov==2.7.1',
'pytest-mock==1.10.4',
'pytest-xdist==1.28.0',
'responses==0.10.6',
'tox==3.12.1'
"pytest==4.5.0",
"pytest-cov==2.7.1",
"pytest-mock==1.10.4",
"pytest-xdist==1.28.0",
"responses==0.10.6",
"tox==3.12.1",
)

setup(
name='snippy-tldr',
version='0.2a0',
author='Heikki J. Laaksonen',
author_email='laaksonen.heikki.j@gmail.com',
license='Apache Software License 2.0',
url='https://github.com/heilaaks/snippy-tldr',
description='Snippy plugin to import tldr man pages.',
name="snippy-tldr",
version="0.2a0",
author="Heikki J. Laaksonen",
author_email="laaksonen.heikki.j@gmail.com",
license="Apache Software License 2.0",
url="https://github.com/heilaaks/snippy-tldr",
description="Snippy plugin to import tldr man pages.",
long_description=README,
long_description_content_type='text/x-rst',
packages=['snippy_tldr'],
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
long_description_content_type="text/x-rst",
packages=["snippy_tldr"],
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
install_requires=REQUIRES,
zip_safe=False,
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Plugins',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Topic :: Software Development :: Documentation',
'Topic :: Utilities',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Operating System :: OS Independent',
'License :: OSI Approved :: Apache Software License',
"Development Status :: 3 - Alpha",
"Environment :: Plugins",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Topic :: Software Development :: Documentation",
"Topic :: Utilities",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Operating System :: OS Independent",
"License :: OSI Approved :: Apache Software License",
],
extras_require={
'devel': EXTRAS_DEVEL + EXTRAS_TEST,
'test': EXTRAS_TEST
},
extras_require={"devel": EXTRAS_DEVEL + EXTRAS_TEST, "test": EXTRAS_TEST},
tests_require=EXTRAS_TEST,
test_suite='tests',
entry_points={
'snippyplugin': [
'snippy = snippy_tldr.plugin'
]
}
test_suite="tests",
entry_points={"snippyplugin": ["snippy = snippy_tldr.plugin"]},
)

0 comments on commit 1245d57

Please sign in to comment.