Enable black
- blackify all the python files, - enable black in pre-commit, - add a black tox environment.
This commit is contained in:
parent
1ae75166c7
commit
93a4d8b784
97 changed files with 1734 additions and 1642 deletions
38
setup.py
38
setup.py
|
@ -12,15 +12,15 @@ from io import open
|
|||
here = path.abspath(path.dirname(__file__))
|
||||
|
||||
# Get the long description from the README file
|
||||
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
|
||||
with open(path.join(here, "README.md"), encoding="utf-8") as f:
|
||||
long_description = f.read()
|
||||
|
||||
|
||||
def parse_requirements(name=None):
|
||||
if name:
|
||||
reqf = 'requirements-%s.txt' % name
|
||||
reqf = "requirements-%s.txt" % name
|
||||
else:
|
||||
reqf = 'requirements.txt'
|
||||
reqf = "requirements.txt"
|
||||
|
||||
requirements = []
|
||||
if not path.exists(reqf):
|
||||
|
@ -29,28 +29,28 @@ def parse_requirements(name=None):
|
|||
with open(reqf) as f:
|
||||
for line in f.readlines():
|
||||
line = line.strip()
|
||||
if not line or line.startswith('#'):
|
||||
if not line or line.startswith("#"):
|
||||
continue
|
||||
requirements.append(line)
|
||||
return requirements
|
||||
|
||||
|
||||
setup(
|
||||
name='swh.lister',
|
||||
description='Software Heritage lister',
|
||||
name="swh.lister",
|
||||
description="Software Heritage lister",
|
||||
long_description=long_description,
|
||||
long_description_content_type='text/markdown',
|
||||
author='Software Heritage developers',
|
||||
author_email='swh-devel@inria.fr',
|
||||
url='https://forge.softwareheritage.org/diffusion/DLSGH/',
|
||||
long_description_content_type="text/markdown",
|
||||
author="Software Heritage developers",
|
||||
author_email="swh-devel@inria.fr",
|
||||
url="https://forge.softwareheritage.org/diffusion/DLSGH/",
|
||||
packages=find_packages(),
|
||||
install_requires=parse_requirements() + parse_requirements('swh'),
|
||||
tests_require=parse_requirements('test'),
|
||||
setup_requires=['vcversioner'],
|
||||
extras_require={'testing': parse_requirements('test')},
|
||||
install_requires=parse_requirements() + parse_requirements("swh"),
|
||||
tests_require=parse_requirements("test"),
|
||||
setup_requires=["vcversioner"],
|
||||
extras_require={"testing": parse_requirements("test")},
|
||||
vcversioner={},
|
||||
include_package_data=True,
|
||||
entry_points='''
|
||||
entry_points="""
|
||||
[swh.cli.subcommands]
|
||||
lister=swh.lister.cli:lister
|
||||
[swh.workers]
|
||||
|
@ -65,7 +65,7 @@ setup(
|
|||
lister.packagist=swh.lister.packagist:register
|
||||
lister.phabricator=swh.lister.phabricator:register
|
||||
lister.pypi=swh.lister.pypi:register
|
||||
''',
|
||||
""",
|
||||
classifiers=[
|
||||
"Programming Language :: Python :: 3",
|
||||
"Intended Audience :: Developers",
|
||||
|
@ -74,8 +74,8 @@ setup(
|
|||
"Development Status :: 5 - Production/Stable",
|
||||
],
|
||||
project_urls={
|
||||
'Bug Reports': 'https://forge.softwareheritage.org/maniphest',
|
||||
'Funding': 'https://www.softwareheritage.org/donate',
|
||||
'Source': 'https://forge.softwareheritage.org/source/swh-lister',
|
||||
"Bug Reports": "https://forge.softwareheritage.org/maniphest",
|
||||
"Funding": "https://www.softwareheritage.org/donate",
|
||||
"Source": "https://forge.softwareheritage.org/source/swh-lister",
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue