MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / find_backend

Function find_backend

diffusers/utils/check_inits.py:50–56  ·  view source on GitHub ↗

Find one (or multiple) backend in a code line of the init.

(line)

Source from the content-addressed store, hash-verified

48
49
50def find_backend(line):
51 """Find one (or multiple) backend in a code line of the init."""
52 if _re_test_backend.search(line) is None:
53 return None
54 backends = [b[0] for b in _re_backend.findall(line)]
55 backends.sort()
56 return "_and_".join(backends)
57
58
59def parse_init(init_file):

Callers 1

parse_initFunction · 0.70

Calls 1

sortMethod · 0.80

Tested by

no test coverage detected