Reformat with Black

No functional changes.
This commit is contained in:
2021-02-16 11:21:06 +01:00
parent 883f125722
commit 8b49c5505e
27 changed files with 3094 additions and 2288 deletions

View File

@@ -19,22 +19,22 @@
# <pep8 compliant>
bl_info = {
'name': 'Blender Cloud',
"name": "Blender Cloud",
"author": "Sybren A. Stüvel, Francesco Siddi, Inês Almeida, Antony Riakiotakis",
'version': (1, 17),
'blender': (2, 80, 0),
'location': 'Addon Preferences panel, and Ctrl+Shift+Alt+A anywhere for texture browser',
'description': 'Texture library browser and Blender Sync. Requires the Blender ID addon '
'and Blender 2.80 or newer.',
'wiki_url': 'https://wiki.blender.org/index.php/Extensions:2.6/Py/'
'Scripts/System/BlenderCloud',
'category': 'System',
"version": (1, 17),
"blender": (2, 80, 0),
"location": "Addon Preferences panel, and Ctrl+Shift+Alt+A anywhere for texture browser",
"description": "Texture library browser and Blender Sync. Requires the Blender ID addon "
"and Blender 2.80 or newer.",
"wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/System/BlenderCloud",
"category": "System",
}
import logging
# Support reloading
if 'pillar' in locals():
if "pillar" in locals():
import importlib
wheels = importlib.reload(wheels)
@@ -60,11 +60,11 @@ def register():
_monkey_patch_requests()
# Support reloading
if '%s.blender' % __name__ in sys.modules:
if "%s.blender" % __name__ in sys.modules:
import importlib
def reload_mod(name):
modname = '%s.%s' % (__name__, name)
modname = "%s.%s" % (__name__, name)
try:
old_module = sys.modules[modname]
except KeyError:
@@ -76,22 +76,32 @@ def register():
sys.modules[modname] = new_module
return new_module
reload_mod('blendfile')
reload_mod('home_project')
reload_mod('utils')
reload_mod('pillar')
reload_mod("blendfile")
reload_mod("home_project")
reload_mod("utils")
reload_mod("pillar")
async_loop = reload_mod('async_loop')
flamenco = reload_mod('flamenco')
attract = reload_mod('attract')
texture_browser = reload_mod('texture_browser')
settings_sync = reload_mod('settings_sync')
image_sharing = reload_mod('image_sharing')
blender = reload_mod('blender')
project_specific = reload_mod('project_specific')
async_loop = reload_mod("async_loop")
flamenco = reload_mod("flamenco")
attract = reload_mod("attract")
texture_browser = reload_mod("texture_browser")
settings_sync = reload_mod("settings_sync")
image_sharing = reload_mod("image_sharing")
blender = reload_mod("blender")
project_specific = reload_mod("project_specific")
else:
from . import (blender, texture_browser, async_loop, settings_sync, blendfile, home_project,
image_sharing, attract, flamenco, project_specific)
from . import (
blender,
texture_browser,
async_loop,
settings_sync,
blendfile,
home_project,
image_sharing,
attract,
flamenco,
project_specific,
)
async_loop.setup_asyncio_executor()
async_loop.register()
@@ -117,15 +127,23 @@ def _monkey_patch_requests():
if requests.__build__ >= 0x020601:
return
log.info('Monkey-patching requests version %s', requests.__version__)
log.info("Monkey-patching requests version %s", requests.__version__)
from requests.packages.urllib3.response import HTTPResponse
HTTPResponse.chunked = False
HTTPResponse.chunk_left = None
def unregister():
from . import (blender, texture_browser, async_loop, settings_sync, image_sharing, attract,
flamenco)
from . import (
blender,
texture_browser,
async_loop,
settings_sync,
image_sharing,
attract,
flamenco,
)
image_sharing.unregister()
attract.unregister()