MCPcopy Create free account
hub / github.com/plotly/dash / generate_metadata_strings

Function generate_metadata_strings

dash/development/_jl_components_generation.py:346–365  ·  view source on GitHub ↗
(resources, metatype)

Source from the content-addressed store, hash-verified

344
345
346def generate_metadata_strings(resources, metatype):
347 def nothing_or_string(v):
348 return '"{}"'.format(v) if v else "nothing"
349
350 return [
351 jl_resource_tuple_string.format(
352 relative_package_path=nothing_or_string(
353 resource.get("relative_package_path", "")
354 ),
355 external_url=nothing_or_string(resource.get("external_url", "")),
356 dynamic=str(resource.get("dynamic", "nothing")).lower(),
357 type=metatype,
358 async_string=(
359 ":{}".format(str(resource.get("async")).lower())
360 if "async" in resource.keys()
361 else "nothing"
362 ),
363 )
364 for resource in resources
365 ]
366
367
368def is_core_package(project_shortname):

Callers 1

generate_package_fileFunction · 0.85

Calls 4

nothing_or_stringFunction · 0.85
keysMethod · 0.80
formatMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…