mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 13:46:32 +00:00
scanpypi: fix code style
Fix these warnings: E101 indentation contains mixed spaces and tabs E128 continuation line under-indented for visual indent E231 missing whitespace after ',' E261 at least two spaces before inline comment E302 expected 2 blank lines, found 1 E305 expected 2 blank lines after class or function definition, found 1 W191 indentation contains tabs Ignore these warnings: E402 module level import not at top of file Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Yegor Yefremov <yegorslists@googlemail.com> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
49ffceef57
commit
2455e5a091
@ -35,6 +35,7 @@ except ImportError:
|
|||||||
'pip install spdx_lookup')
|
'pip install spdx_lookup')
|
||||||
liclookup = None
|
liclookup = None
|
||||||
|
|
||||||
|
|
||||||
def setup_decorator(func, method):
|
def setup_decorator(func, method):
|
||||||
"""
|
"""
|
||||||
Decorator for distutils.core.setup and setuptools.setup.
|
Decorator for distutils.core.setup and setuptools.setup.
|
||||||
@ -55,11 +56,12 @@ def setup_decorator(func, method):
|
|||||||
return closure
|
return closure
|
||||||
|
|
||||||
# monkey patch
|
# monkey patch
|
||||||
import setuptools
|
import setuptools # noqa E402
|
||||||
setuptools.setup = setup_decorator(setuptools.setup, 'setuptools')
|
setuptools.setup = setup_decorator(setuptools.setup, 'setuptools')
|
||||||
import distutils
|
import distutils # noqa E402
|
||||||
distutils.core.setup = setup_decorator(setuptools.setup, 'distutils')
|
distutils.core.setup = setup_decorator(setuptools.setup, 'distutils')
|
||||||
|
|
||||||
|
|
||||||
def find_file_upper_case(filenames, path='./'):
|
def find_file_upper_case(filenames, path='./'):
|
||||||
"""
|
"""
|
||||||
List generator:
|
List generator:
|
||||||
@ -91,9 +93,11 @@ def pkg_buildroot_name(pkg_name):
|
|||||||
name = pattern.sub(r'python-\1', name)
|
name = pattern.sub(r'python-\1', name)
|
||||||
return name
|
return name
|
||||||
|
|
||||||
|
|
||||||
class DownloadFailed(Exception):
|
class DownloadFailed(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class BuildrootPackage():
|
class BuildrootPackage():
|
||||||
"""This class's methods are not meant to be used individually please
|
"""This class's methods are not meant to be used individually please
|
||||||
use them in the correct order:
|
use them in the correct order:
|
||||||
@ -695,5 +699,6 @@ def main():
|
|||||||
finally:
|
finally:
|
||||||
shutil.rmtree(tmp_path)
|
shutil.rmtree(tmp_path)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user