mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 03:29:50 +00:00
docs: Make autopep8 happy for gst-plugins-doc-cache-generator.py
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8327>
This commit is contained in:
parent
5b4eb339a3
commit
ed7b210ae7
1 changed files with 22 additions and 23 deletions
|
@ -58,6 +58,7 @@ def get_c_flags(dep, buildroot, uninstalled=True):
|
|||
|
||||
return [res.stdout.decode().strip()]
|
||||
|
||||
|
||||
class GstLibsHotdocConfGen:
|
||||
def __init__(self):
|
||||
parser = ArgumentParser()
|
||||
|
@ -224,7 +225,6 @@ class GstLibsHotdocConfGen:
|
|||
return conf_files
|
||||
|
||||
|
||||
|
||||
class GstPluginsHotdocConfGen:
|
||||
def __init__(self):
|
||||
|
||||
|
@ -308,7 +308,6 @@ class GstPluginsHotdocConfGen:
|
|||
UNSTABLE_VALUE = "unstable-values"
|
||||
|
||||
|
||||
|
||||
def dict_recursive_update(d, u):
|
||||
modified = False
|
||||
unstable_values = d.get(UNSTABLE_VALUE, [])
|
||||
|
@ -332,20 +331,21 @@ def test_unstable_values():
|
|||
current_cache = {"v1": "yes", "unstable-values": "v1"}
|
||||
new_cache = {"v1": "no"}
|
||||
|
||||
assert(dict_recursive_update(current_cache, new_cache) == False)
|
||||
assert (dict_recursive_update(current_cache, new_cache) is False)
|
||||
|
||||
new_cache = {"v1": "no", "unstable-values": "v2"}
|
||||
assert(dict_recursive_update(current_cache, new_cache) == True)
|
||||
assert (dict_recursive_update(current_cache, new_cache) is True)
|
||||
|
||||
current_cache = {"v1": "yes", "v2": "yay", "unstable-values": "v1", }
|
||||
new_cache = {"v1": "no"}
|
||||
assert(dict_recursive_update(current_cache, new_cache) == False)
|
||||
assert (dict_recursive_update(current_cache, new_cache) is False)
|
||||
|
||||
current_cache = {"v1": "yes", "v2": "yay", "unstable-values": "v2"}
|
||||
new_cache = {"v1": "no", "v2": "unstable"}
|
||||
assert (dict_recursive_update(current_cache, new_cache) == True)
|
||||
assert (dict_recursive_update(current_cache, new_cache) is True)
|
||||
assert (current_cache == {"v1": "no", "v2": "yay", "unstable-values": "v2"})
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if sys.argv[1] == "hotdoc-config":
|
||||
fs = GstPluginsHotdocConfGen().generate_plugins_configs()
|
||||
|
@ -355,7 +355,6 @@ if __name__ == "__main__":
|
|||
fs = GstLibsHotdocConfGen().generate_libs_configs()
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
cache_filename = sys.argv[1]
|
||||
output_filename = sys.argv[2]
|
||||
build_root = os.environ.get('MESON_BUILD_ROOT', '')
|
||||
|
|
Loading…
Reference in a new issue