Passed
Push — master ( 1ed32d...5696b4 )
by manny
01:30 queued 11s
created

scripting   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 6
eloc 15
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
B fill_source_list() 0 13 6
1
import obspython as obs
2
from helpers.obs_context_manager import source_list_ar
3
4
5
def fill_source_list(p):
6
    obs.obs_property_list_clear(p)
7
    obs.obs_property_list_add_string(p, "", "")
8
    with source_list_ar() as sources:
9
        if sources is not None:
10
            for source in sources:
11
                source_id = obs.obs_source_get_unversioned_id(source)
12
                if (
13
                    source_id == "text_gdiplus" or
14
                    source_id == "text_ft2_source"
15
                ):
16
                    name = obs.obs_source_get_name(source)
17
                    obs.obs_property_list_add_string(p, name, name)
18