GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

setup.get_description()   A
last analyzed

Complexity

Conditions 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 2
nop 0
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
# -----------------------------------------------------------------------------
4
# Copyright (c) 2015 Yann Lanthony
5
# Copyright (c) 2017-2018 Spyder Project Contributors
6
#
7
# Licensed under the terms of the MIT License
8
# (See LICENSE.txt for details)
9
# -----------------------------------------------------------------------------
10
"""Setup script for qtsass."""
11
12
# Standard library imports
13
from io import open
14
import ast
15
import os
16
17
# Third party imports
18
from setuptools import find_packages, setup
19
20
21
# Constants
22
HERE = os.path.abspath(os.path.dirname(__file__))
23
24
25
def get_version(module='qtsass'):
26
    """Get version."""
27
    with open(os.path.join(HERE, module, '__init__.py'), 'r') as f:
28
        data = f.read()
29
30
    lines = data.split('\n')
31
    for line in lines:
32
        if line.startswith('__version__'):
33
            version = ast.literal_eval(line.split('=')[-1].strip())
34
            break
35
36
    return version
0 ignored issues
show
introduced by
The variable version does not seem to be defined for all execution paths.
Loading history...
37
38
39
def get_description():
40
    """Get long description."""
41
    with open(os.path.join(HERE, 'README.md'), 'r', encoding='utf-8') as f:
42
        data = f.read()
43
44
    return data
45
46
47
setup(
48
    name='qtsass',
49
    version=get_version(),
50
    description='Compile SCSS files to valid Qt stylesheets.',
51
    long_description=get_description(),
52
    long_description_content_type='text/markdown',
53
    author='Yann Lanthony',
54
    maintainer='The Spyder Project Contributors',
55
    maintainer_email='[email protected]',
56
    url='https://github.com/spyder-ide/qtsass',
57
    license='MIT',
58
    packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
59
    entry_points={
60
        'console_scripts': [
61
            'qtsass = qtsass.cli:main'
62
        ]
63
    },
64
    classifiers=(
65
        'Development Status :: 5 - Production/Stable',
66
        'Intended Audience :: Developers',
67
        'License :: OSI Approved :: MIT License',
68
        'Natural Language :: English',
69
        'Operating System :: OS Independent',
70
        'Programming Language :: Python',
71
        'Programming Language :: Python :: 2',
72
        'Programming Language :: Python :: 2.7',
73
        'Programming Language :: Python :: 3',
74
        'Programming Language :: Python :: 3.5',
75
        'Programming Language :: Python :: 3.6',
76
        'Programming Language :: Python :: 3.7',
77
        'Programming Language :: Python :: 3.8',
78
        'Topic :: Software Development :: Build Tools',
79
        'Topic :: Software Development :: Libraries :: Python Modules',
80
    ),
81
    install_requires=[
82
        'libsass',
83
    ],
84
    keywords='qt sass qtsass scss css qss stylesheets',
85
)
86