Convert a CDP `$ref` to the name of a Python type. For a dotted ref, the part before the dot is snake cased.
(ref)
| 158 | |
| 159 | |
| 160 | def ref_to_python(ref): |
| 161 | """Convert a CDP `$ref` to the name of a Python type. |
| 162 | |
| 163 | For a dotted ref, the part before the dot is snake cased. |
| 164 | """ |
| 165 | if "." in ref: |
| 166 | domain, subtype = ref.split(".") |
| 167 | ref = f"{snake_case(domain)}.{subtype}" |
| 168 | return f"{ref}" |
| 169 | |
| 170 | |
| 171 | class CdpPrimitiveType(Enum): |
no test coverage detected