Test Setup Failed
Push — master ( e0006b...6b6128 )
by Michael
11:16
created

setup.main()   B

Complexity

Conditions 2

Size

Total Lines 52
Code Lines 43

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 43
dl 0
loc 52
rs 8.8478
c 0
b 0
f 0
cc 2
nop 0

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
#!/usr/bin/env python
2
# coding: utf-8
3
4
from setuptools import find_packages, setup
5
6
7
def main() -> None:
8
    with open('README.md') as file:
9
        long_description = file.read()
10
11
    packages = find_packages(exclude=['tests'])
12
    package_data = {package: ['py.typed'] for package in packages}
13
14
    setup(
15
        name='aiohttp-rpc',
16
        version='1.2.0',
17
        author='Michael Sulyak',
18
        url='https://github.com/expert-m/aiohttp-rpc/',
19
        author_email='[email protected]',
20
        keywords=[
21
            'aiohttp', 'asyncio', 'json-rpc', 'rpc',
22
        ],
23
        install_requires=[
24
            'aiohttp>=3,<4',
25
        ],
26
        license='MIT license',
27
        description='A simple JSON-RPC for aiohttp',
28
        long_description=long_description,
29
        long_description_content_type='text/markdown',
30
        python_requires='>=3.8.1',
31
        packages=packages,
32
        package_data=package_data,
33
        classifiers=[
34
            # 'Development Status :: 1 - Planning',
35
            # 'Development Status :: 2 - Pre-Alpha',
36
            # 'Development Status :: 3 - Alpha',
37
            # 'Development Status :: 4 - Beta',
38
            'Development Status :: 5 - Production/Stable',
39
            'Environment :: Web Environment',
40
            'Intended Audience :: Developers',
41
            'License :: OSI Approved :: MIT License',
42
            'Operating System :: OS Independent',
43
            'Programming Language :: Python',
44
            'Programming Language :: Python :: 3',
45
            'Programming Language :: Python :: 3.8',
46
            'Programming Language :: Python :: 3.9',
47
            'Programming Language :: Python :: 3.10',
48
            'Programming Language :: Python :: 3.11',
49
            'Framework :: AsyncIO',
50
            'Framework :: aiohttp',
51
            'Topic :: Internet',
52
            'Topic :: Communications',
53
            'Topic :: Software Development :: Libraries',
54
            'Topic :: Software Development :: Libraries :: Python Modules',
55
        ],
56
        project_urls={
57
            'GitHub: issues': 'https://github.com/expert-m/aiohttp-rpc/issues',
58
            'GitHub: repo': 'https://github.com/expert-m/aiohttp-rpc',
59
        },
60
    )
61
62
63
if __name__ == '__main__':
64
    main()
65