all python files are now formated with black (#23)

* all python files are now formated with black

NOTE:
some configurations where necessary. flake8 line-length has to be set to 88
which is the default for black. but this was not enough some lines of black
where formated longer then 88 characters. found flake8-bugbear with B950.

with that and in combination with ignore=E501 it is possible to ignore long
lines, but if there are lines to long it will still point it out.

further also for isort some configuration was necessary

REFERENCES:
https://github.com/psf/black/blob/master/docs/compatible_configs.md#isort
https://github.com/psf/black/blob/master/docs/compatible_configs.md#flake8
https://github.com/PyCQA/flake8-bugbear#opinionated-warnings

* ext removed unnecessary commented import statement

* generators add pragma: no cover to increase code coverage

NOTE:
this should be corrected with a real test in one of the next commits

* fixed the syntax.

Co-authored-by: Mojib Wali <44528277+mb-wali@users.noreply.github.com>
This commit is contained in:
Christoph Ladurner
2020-10-15 10:36:58 +02:00
committed by GitHub
parent 0a37a8015e
commit 2ccd24cfca
12 changed files with 234 additions and 193 deletions

View File

@@ -12,35 +12,34 @@ import os
from setuptools import find_packages, setup
readme = open('README.rst').read()
history = open('CHANGES.rst').read()
readme = open("README.rst").read()
history = open("CHANGES.rst").read()
tests_require = [
'pytest-invenio>=1.4.0',
"pytest-invenio>=1.4.0",
]
extras_require = {
'docs': [
'Sphinx>=1.5.1',
"docs": [
"Sphinx>=1.5.1",
],
'tests': tests_require,
"tests": tests_require,
}
extras_require['all'] = []
extras_require["all"] = []
for reqs in extras_require.values():
extras_require['all'].extend(reqs)
extras_require["all"].extend(reqs)
setup_requires = [
'Babel>=1.3',
'pytest-runner>=3.0.0,<5',
"Babel>=1.3",
"pytest-runner>=3.0.0,<5",
]
install_requires = [
'Flask-BabelEx>=0.9.4',
'elasticsearch_dsl>=7.2.1',
'invenio-rdm-records~=0.18.3',
'invenio_search>=1.3.1',
"Flask-BabelEx>=0.9.4",
"elasticsearch_dsl>=7.2.1",
"invenio-rdm-records~=0.18.3",
"invenio_search>=1.3.1",
]
packages = find_packages()
@@ -48,33 +47,33 @@ packages = find_packages()
# Get the version string. Cannot be done with import!
g = {}
with open(os.path.join('invenio_config_tugraz', 'version.py'), 'rt') as fp:
with open(os.path.join("invenio_config_tugraz", "version.py"), "rt") as fp:
exec(fp.read(), g)
version = g['__version__']
version = g["__version__"]
setup(
name='invenio-config-tugraz',
name="invenio-config-tugraz",
version=version,
description=__doc__,
long_description=readme + '\n\n' + history,
keywords='invenio, config, Tu Graz',
license='MIT',
author='Mojib Wali',
author_email='mojib.wali@tugraz.at',
url='https://github.com/mb-wali/invenio-config-tugraz',
long_description=readme + "\n\n" + history,
keywords="invenio, config, Tu Graz",
license="MIT",
author="Mojib Wali",
author_email="mojib.wali@tugraz.at",
url="https://github.com/mb-wali/invenio-config-tugraz",
packages=packages,
zip_safe=False,
include_package_data=True,
platforms='any',
platforms="any",
entry_points={
'invenio_base.apps': [
'invenio_config_tugraz = invenio_config_tugraz:InvenioConfigTugraz',
"invenio_base.apps": [
"invenio_config_tugraz = invenio_config_tugraz:InvenioConfigTugraz",
],
'invenio_i18n.translations': [
'messages = invenio_config_tugraz',
"invenio_i18n.translations": [
"messages = invenio_config_tugraz",
],
'invenio_config.module': [
'invenio_config_tugraz = invenio_config_tugraz.config',
"invenio_config.module": [
"invenio_config_tugraz = invenio_config_tugraz.config",
],
},
extras_require=extras_require,
@@ -82,17 +81,17 @@ setup(
setup_requires=setup_requires,
tests_require=tests_require,
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Development Status :: 3 - Alpha',
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Development Status :: 3 - Alpha",
],
)