Generate all column classes.
()
| 258 | |
| 259 | |
| 260 | def _generate_col_classes() -> Generator[type[Col]]: |
| 261 | """Generate all column classes.""" |
| 262 | # Abstract classes are not in the class map. |
| 263 | cprefixes = ["Int", "UInt", "Float", "Time"] |
| 264 | for kind, kdata in atom.atom_map.items(): |
| 265 | if hasattr(kdata, "kind"): # atom class: non-fixed item size |
| 266 | atomclass = kdata |
| 267 | cprefixes.append(atomclass.prefix()) |
| 268 | else: # dictionary: fixed item size |
| 269 | for atomclass in kdata.values(): |
| 270 | cprefixes.append(atomclass.prefix()) |
| 271 | |
| 272 | # Bottom-level complex classes are not in the type map, of course. |
| 273 | # We still want the user to get the compatibility warning, though. |
| 274 | cprefixes.extend(["Complex32", "Complex64", "Complex128"]) |
| 275 | if hasattr(atom, "Complex192Atom"): |
| 276 | cprefixes.append("Complex192") |
| 277 | if hasattr(atom, "Complex256Atom"): |
| 278 | cprefixes.append("Complex256") |
| 279 | |
| 280 | for cprefix in cprefixes: |
| 281 | newclass = Col._subclass_from_prefix(cprefix) |
| 282 | yield newclass |
| 283 | |
| 284 | |
| 285 | # Create all column classes. |
nothing calls this directly
no test coverage detected