Merge branch 'maintenance' into devel
This commit is contained in:
commit
fe719623ed
3 files changed
+22
-27
No files matched your search
@@ -51,6 +51,7 @@ def cli(ctx):
|
||||
"--processes",
|
||||
type=int,
|
||||
help="Number of processes to use for creating thumbnails",
|
||||
default=1,
|
||||
)
|
||||
@click.argument("paths", nargs=-1, type=click.Path())
|
||||
@click.pass_context
|
||||
|
||||
@@ -1 +1 @@
|
||||
table td.settings_plugin_announcements_channels_name,table th.settings_plugin_announcements_channels_name{text-overflow:ellipsis;text-align:left}table td.settings_plugin_announcements_channels_actions,table th.settings_plugin_announcements_channels_actions{text-align:center;width:80px}table td.settings_plugin_announcements_channels_actions a,table th.settings_plugin_announcements_channels_actions a{text-decoration:none;color:#000}table td.settings_plugin_announcements_channels_actions a.disabled,table th.settings_plugin_announcements_channels_actions a.disabled{color:#ccc;cursor:default}#plugin_announcements_dialog .unread{font-weight:700}#plugin_announcements_dialog article{padding-right:20px}#plugin_announcements_dialog article.read{opacity:.5}#plugin_announcements_dialog article.read:hover{opacity:1}#plugin_announcements_dialog article .actions{background-color:#f5f5f5;border-radius:2px;padding:2px 5px;margin-top:5px}#plugin_announcements_dialog article .actions .markread{float:right}#plugin_announcements_dialog article .actions a{color:#000}#plugin_announcements_dialog .modal-footer .configurelink{float:left}
|
||||
table th.settings_plugin_announcements_channels_name,table td.settings_plugin_announcements_channels_name{text-overflow:ellipsis;text-align:left}table th.settings_plugin_announcements_channels_actions,table td.settings_plugin_announcements_channels_actions{text-align:center;width:80px}table th.settings_plugin_announcements_channels_actions a,table td.settings_plugin_announcements_channels_actions a{text-decoration:none;color:#000}table th.settings_plugin_announcements_channels_actions a.disabled,table td.settings_plugin_announcements_channels_actions a.disabled{color:#ccc;cursor:default}#plugin_announcements_dialog .unread{font-weight:bold}#plugin_announcements_dialog article{padding-right:20px}#plugin_announcements_dialog article.read{opacity:.5}#plugin_announcements_dialog article.read:hover{opacity:1}#plugin_announcements_dialog article .actions{background-color:#f5f5f5;border-radius:2px;padding:2px 5px;margin-top:5px}#plugin_announcements_dialog article .actions .markread{float:right}#plugin_announcements_dialog article .actions a{color:black}#plugin_announcements_dialog .modal-footer .configurelink{float:left}
|
||||
+20
-26
@@ -629,36 +629,30 @@ class HierarchicalChainMap:
|
||||
|
||||
key = self._path_to_key(path)
|
||||
|
||||
# we do something a bit odd here: if merged is not true, we don't include the
|
||||
# full contents of the key. Instead, we only include the contents of the key on
|
||||
# the first level where we find the value.
|
||||
#
|
||||
# TODO 2.0.0 remove this weird & historic behaviour and make 'merged' the default
|
||||
if not merged and not only_local:
|
||||
# first check if we can find the exact key & if so use that layer
|
||||
if key in current:
|
||||
# found it, return
|
||||
return current[key]
|
||||
|
||||
# if we arrived here we might be trying to grab a dict, look for children
|
||||
|
||||
key = key + _CHAINMAP_SEP
|
||||
|
||||
# TODO 2.0.0 remove this & make 'merged' the default
|
||||
if not merged and hasattr(current, "maps"):
|
||||
# we do something a bit odd here: if merged is not true, we don't include the
|
||||
# full contents of the key. Instead, we only include the contents of the key
|
||||
# on the first level where we find the value.
|
||||
for layer in current.maps:
|
||||
if key in layer:
|
||||
if any(k.startswith(key) for k in layer):
|
||||
current = layer
|
||||
break
|
||||
else:
|
||||
# next, check if we can find the key as a prefix for a subtree & if so
|
||||
# use that layer
|
||||
for layer in current.maps:
|
||||
if any(k.startswith(key) for k in layer):
|
||||
current = layer
|
||||
break
|
||||
|
||||
if key not in current:
|
||||
# we might be trying to grab a dict, look for children
|
||||
key = key + _CHAINMAP_SEP
|
||||
result = self._unflatten(
|
||||
{k: v for k, v in current.items() if k.startswith(key)}, prefix=key
|
||||
)
|
||||
if not result:
|
||||
raise KeyError("Could not find entry for " + str(path))
|
||||
return result
|
||||
|
||||
return current[key]
|
||||
result = self._unflatten(
|
||||
{k: v for k, v in current.items() if k.startswith(key)}, prefix=key
|
||||
)
|
||||
if not result:
|
||||
raise KeyError("Could not find entry for " + str(path))
|
||||
return result
|
||||
|
||||
def set_by_path(self, path, value):
|
||||
current = self._chainmap
|
||||
|
||||
Reference in new issue
Block a user