-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expand linting to include formatting and import order
- Loading branch information
Mark Edwards
committed
Nov 15, 2022
1 parent
4ffd721
commit 0b800c6
Showing
8 changed files
with
247 additions
and
220 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[flake8] | ||
application_import_names = aiodataloader | ||
exclude = .git,.mypy_cache,.pytest_cache,.tox,.venv,__pycache__,build,dist,docs | ||
ignore = E203 | ||
import_order_style = smarkets | ||
max-line-length = 88 |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[tool.black] | ||
target-version = ["py36", "py37", "py38", "py39", "py310", "py311"] | ||
|
||
[tool.isort] | ||
force_single_line = false | ||
known_first_party = "aiodataloader" | ||
order_by_type = false | ||
profile = "black" | ||
|
||
[tool.mypy] | ||
files = ["aiodataloader/**/*.py", "setup.py", "test_aiodataloader.py"] | ||
follow_imports = "silent" | ||
ignore_missing_imports = true | ||
strict = true |
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 |
---|---|---|
@@ -1,57 +1,54 @@ | ||
import os | ||
import sys | ||
from setuptools import setup, find_packages | ||
from setuptools import setup | ||
|
||
|
||
def get_version(filename): | ||
def get_version(filename: str) -> str: | ||
import os | ||
import re | ||
|
||
here = os.path.dirname(os.path.abspath(__file__)) | ||
with open(os.path.join(here, filename)) as f: | ||
version_file = f.read() | ||
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", | ||
version_file, re.M) | ||
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M) | ||
if version_match: | ||
return version_match.group(1) | ||
raise RuntimeError("Unable to find version string.") | ||
|
||
|
||
version = get_version('aiodataloader/__init__.py') | ||
version = get_version("aiodataloader/__init__.py") | ||
|
||
tests_require = [ | ||
'pytest>=3.6', 'pytest-cov', 'coveralls', 'mock', 'pytest-asyncio' | ||
] | ||
tests_require = ["pytest>=3.6", "pytest-cov", "coveralls", "mock", "pytest-asyncio"] | ||
|
||
setup( | ||
name='aiodataloader', | ||
name="aiodataloader", | ||
version=version, | ||
description='Asyncio DataLoader implementation for Python', | ||
long_description=open('README.md').read(), | ||
description="Asyncio DataLoader implementation for Python", | ||
long_description=open("README.md").read(), | ||
long_description_content_type="text/markdown", | ||
url='https://github.com/syrusakbary/aiodataloader', | ||
download_url='https://github.com/syrusakbary/aiodataloader/releases', | ||
author='Syrus Akbary', | ||
author_email='me@syrusakbary.com', | ||
license='MIT', | ||
url="https://github.com/syrusakbary/aiodataloader", | ||
download_url="https://github.com/syrusakbary/aiodataloader/releases", | ||
author="Syrus Akbary", | ||
author_email="me@syrusakbary.com", | ||
license="MIT", | ||
classifiers=[ | ||
'Development Status :: 5 - Production/Stable', | ||
'Intended Audience :: Developers', | ||
'Topic :: Software Development :: Libraries', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'License :: OSI Approved :: MIT License', | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"Topic :: Software Development :: Libraries", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"License :: OSI Approved :: MIT License", | ||
], | ||
keywords='concurrent future deferred aiodataloader', | ||
py_modules=['aiodataloader'], | ||
python_requires='>=3.6', | ||
keywords="concurrent future deferred aiodataloader", | ||
py_modules=["aiodataloader"], | ||
python_requires=">=3.6", | ||
extras_require={ | ||
'lint': ['flake8', 'mypy'], | ||
'test': tests_require, | ||
"lint": ["black", "flake8", "flake8-import-order", "mypy"], | ||
"test": tests_require, | ||
}, | ||
install_requires=["typing_extensions>=4.3.0"], | ||
tests_require=tests_require, ) | ||
tests_require=tests_require, | ||
) |
Oops, something went wrong.