fixes pylint warnings

This commit is contained in:
Moisés Guimarães
2016-11-22 10:31:14 -03:00
parent c0b59a585b
commit 0ed0672b16
9 changed files with 57 additions and 39 deletions

View File

@ -1,6 +1,8 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# setup.py
#
# Copyright (C) 2006-2016 wolfSSL Inc. # Copyright (C) 2006-2016 wolfSSL Inc.
# #
# This file is part of wolfSSL. (formerly known as CyaSSL) # This file is part of wolfSSL. (formerly known as CyaSSL)
@ -23,33 +25,33 @@
from __future__ import absolute_import from __future__ import absolute_import
import os import os
import sys import sys
from wolfssl.__about__ import metadata from wolfssl.__about__ import METADATA
from setuptools import setup, find_packages from setuptools import setup, find_packages
os.chdir(os.path.dirname(sys.argv[0]) or ".") os.chdir(os.path.dirname(sys.argv[0]) or ".")
long_description = open("README.rst", "rt").read().replace( LONG_DESCRIPTION = open("README.rst", "rt").read().replace(
".. include:: LICENSING.rst\n", ".. include:: LICENSING.rst\n",
open("LICENSING.rst", "rt").read() open("LICENSING.rst", "rt").read()
) )
info = dict( INFO = dict(
metadata = {k[2:-2]: metadata[k] for k in metadata}, metadata={k[2:-2]: METADATA[k] for k in METADATA},
contents = { contents={
"long_description": long_description, "long_description" : LONG_DESCRIPTION,
"package_data": {"": ["*.txt"]}, "package_data" : {"": ["*.txt"]},
"packages": find_packages(), "packages" : find_packages(),
"cffi_modules": ["./wolfssl/build_ffi.py:ffi"], "cffi_modules" : ["./wolfssl/build_ffi.py:ffi"],
}, },
requirements = { requirements={
"setup_requires": ["cffi>=1.6.0"], "setup_requires" : ["cffi>=1.6.0"],
"install_requires": ["cffi>=1.6.0"], "install_requires" : ["cffi>=1.6.0"],
}, },
scripts = {}, scripts={},
plugins = {}, plugins={},
tests = {}, tests={},
) )
if __name__ == "__main__": if __name__ == "__main__":
kwargs = {k:v for dct in info.values() for (k,v) in dct.items()} KWARGS = {k:v for dct in INFO.values() for (k, v) in dct.items()}
setup(**kwargs) setup(**KWARGS)

View File

@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
#
# test_context.py # test_context.py
# #
# Copyright (C) 2006-2016 wolfSSL Inc. # Copyright (C) 2006-2016 wolfSSL Inc.

View File

@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
#
# __about__.py # __about__.py
# #
# Copyright (C) 2006-2016 wolfSSL Inc. # Copyright (C) 2006-2016 wolfSSL Inc.
@ -18,28 +20,28 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
metadata = dict( METADATA = dict(
__name__ = "wolfssl", __name__="wolfssl",
__version__ = "0.1.0", __version__="0.1.0",
__license__ = "GPLv2 or Commercial License", __license__="GPLv2 or Commercial License",
__author__ = "wolfSSL Inc.", __author__="wolfSSL Inc.",
__author_email__ = "info@wolfssl.com", __author_email__="info@wolfssl.com",
__url__ = "https://wolfssl.github.io/wolfssl-py", __url__="https://wolfssl.github.io/wolfssl-py",
__description__ = \ __description__= \
u"A Python module that encapsulates wolfSSL's C SSL/TLS library.", u"A Python module that encapsulates wolfSSL's C SSL/TLS library.",
__keywords__ = "security, cryptography, ssl, embedded, embedded ssl", __keywords__="security, cryptography, ssl, embedded, embedded ssl",
__classifiers__ = [ __classifiers__=[
u"License :: OSI Approved :: GNU General Public License v2 (GPLv2)", u"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
u"License :: Other/Proprietary License", u"License :: Other/Proprietary License",
u"Operating System :: OS Independent", u"Operating System :: OS Independent",
u"Programming Language :: Python :: 2.7", u"Programming Language :: Python :: 2.7",
u"Programming Language :: Python :: 3.5", u"Programming Language :: Python :: 3.5",
u"Topic :: Security", u"Topic :: Security",
u"Topic :: Security :: Cryptography", u"Topic :: Security :: Cryptography",
u"Topic :: Software Development" u"Topic :: Software Development"
] ]
) )
globals().update(metadata) globals().update(METADATA)
__all__ = list(metadata.keys()) __all__ = list(METADATA.keys())

View File

@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
#
# _context.py # _context.py
# #
# Copyright (C) 2006-2016 wolfSSL Inc. # Copyright (C) 2006-2016 wolfSSL Inc.

View File

@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
#
# _exceptions.py # _exceptions.py
# #
# Copyright (C) 2006-2016 wolfSSL Inc. # Copyright (C) 2006-2016 wolfSSL Inc.

View File

@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
#
# _memory.py # _memory.py
# #
# Copyright (C) 2006-2016 wolfSSL Inc. # Copyright (C) 2006-2016 wolfSSL Inc.

View File

@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
#
# _methods.py # _methods.py
# #
# Copyright (C) 2006-2016 wolfSSL Inc. # Copyright (C) 2006-2016 wolfSSL Inc.

View File

@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
#
# build_ffi.py # build_ffi.py
# #
# Copyright (C) 2006-2016 wolfSSL Inc. # Copyright (C) 2006-2016 wolfSSL Inc.

View File

@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
#
# utils.py # utils.py
# #
# Copyright (C) 2006-2016 wolfSSL Inc. # Copyright (C) 2006-2016 wolfSSL Inc.