(
self,
labname: str,
value_labels: dict[float, str],
encoding: Literal["latin-1", "utf-8"] = "latin-1",
)
| 696 | """ |
| 697 | |
| 698 | def __init__( |
| 699 | self, |
| 700 | labname: str, |
| 701 | value_labels: dict[float, str], |
| 702 | encoding: Literal["latin-1", "utf-8"] = "latin-1", |
| 703 | ) -> None: |
| 704 | if encoding not in ("latin-1", "utf-8"): |
| 705 | raise ValueError("Only latin-1 and utf-8 are supported.") |
| 706 | |
| 707 | self.labname = labname |
| 708 | self._encoding = encoding |
| 709 | self.value_labels = sorted( # type: ignore[assignment] |
| 710 | value_labels.items(), key=lambda x: x[0] |
| 711 | ) |
| 712 | self._prepare_value_labels() |
| 713 | |
| 714 | |
| 715 | class StataMissingValue: |
nothing calls this directly
no test coverage detected