[Python API] Align openvino/__init__ files (#9871)

* [Python API] Align openvino/__init__ files

* style fix
This commit is contained in:
Anastasia Kuporosova 2022-01-26 21:16:34 +03:00 committed by GitHub
parent a90bb1ff01
commit c7eeda0247
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 7 deletions

View File

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright (C) 2018-2022 Intel Corporation # Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore # mypy issue #1422
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore # mypy issue #1422

View File

@ -5,7 +5,7 @@
import os import os
import sys import sys
if sys.platform == 'win32': if sys.platform == "win32":
# Installer, yum, pip installs openvino dlls to the different directories # Installer, yum, pip installs openvino dlls to the different directories
# and those paths need to be visible to the openvino modules # and those paths need to be visible to the openvino modules
# #
@ -13,11 +13,11 @@ if sys.platform == 'win32':
# add the location of openvino dlls to your system PATH. # add the location of openvino dlls to your system PATH.
# #
# looking for the libs in the pip installation path by default. # looking for the libs in the pip installation path by default.
openvino_libs = [os.path.join(os.path.dirname(__file__), '..', '..', 'openvino', 'libs')] openvino_libs = [os.path.join(os.path.dirname(__file__), "..", "..", "openvino", "libs")]
# setupvars.bat script set all libs paths to OPENVINO_LIB_PATHS environment variable. # setupvars.bat script set all libs paths to OPENVINO_LIB_PATHS environment variable.
openvino_libs_installer = os.getenv('OPENVINO_LIB_PATHS') openvino_libs_installer = os.getenv("OPENVINO_LIB_PATHS")
if openvino_libs_installer: if openvino_libs_installer:
openvino_libs.extend(openvino_libs_installer.split(';')) openvino_libs.extend(openvino_libs_installer.split(";"))
for lib in openvino_libs: for lib in openvino_libs:
lib_path = os.path.join(os.path.dirname(__file__), lib) lib_path = os.path.join(os.path.dirname(__file__), lib)
if os.path.isdir(lib_path): if os.path.isdir(lib_path):
@ -25,9 +25,9 @@ if sys.platform == 'win32':
if (3, 8) <= sys.version_info: if (3, 8) <= sys.version_info:
os.add_dll_directory(os.path.abspath(lib_path)) os.add_dll_directory(os.path.abspath(lib_path))
else: else:
os.environ['PATH'] = os.path.abspath(lib_path) + ';' + os.environ['PATH'] os.environ["PATH"] = os.path.abspath(lib_path) + ";" + os.environ["PATH"]
from .ie_api import * from .ie_api import *
__all__ = ['IENetwork', 'TensorDesc', 'IECore', 'Blob', 'PreProcessInfo', 'get_version'] __all__ = ["IENetwork", "TensorDesc", "IECore", "Blob", "PreProcessInfo", "get_version"]
__version__ = get_version() # type: ignore __version__ = get_version() # type: ignore

View File

@ -1,4 +1,5 @@
[flake8] [flake8]
inline-quotes = double
filename = *.py, *.pyx filename = *.py, *.pyx
max-line-length = 160 max-line-length = 160
ignore = E203 ignore = E203

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2018-2022 Intel Corporation # Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0