Misc cleanup, see commit body (#227)
- Enable oneof_enum test case that passes now (removed the xfail) - Switch from toml to tomlkit as a dev dep for better toml support - upgrade poethepoet to latest stable release - use full table format for poe tasks to avoid long lines in pyproject.toml - remove redundant _WrappedMessage class - fix various Mypy warnings - reformat some comments for consistent line length
This commit is contained in:
		| @@ -170,6 +170,8 @@ class ProtoContentBase: | ||||
|     comment_indent: int = 4 | ||||
|     parent: Union["betterproto.Message", "OutputTemplate"] | ||||
|  | ||||
|     __dataclass_fields__: Dict[str, object] | ||||
|  | ||||
|     def __post_init__(self) -> None: | ||||
|         """Checks that no fake default fields were left as placeholders.""" | ||||
|         for field_name, field_val in self.__dataclass_fields__.items(): | ||||
|   | ||||
| @@ -13,7 +13,7 @@ from betterproto.lib.google.protobuf.compiler import ( | ||||
| import itertools | ||||
| import pathlib | ||||
| import sys | ||||
| from typing import Iterator, List, Tuple, TYPE_CHECKING, Union | ||||
| from typing import Iterator, List, Set, Tuple, TYPE_CHECKING, Union | ||||
| from .compiler import outputfile_compiler | ||||
| from .models import ( | ||||
|     EnumDefinitionCompiler, | ||||
| @@ -38,7 +38,7 @@ def traverse( | ||||
| ) -> "itertools.chain[Tuple[Union[str, EnumDescriptorProto], List[int]]]": | ||||
|     # Todo: Keep information about nested hierarchy | ||||
|     def _traverse( | ||||
|         path: List[int], items: List["Descriptor"], prefix="" | ||||
|         path: List[int], items: List["EnumDescriptorProto"], prefix="" | ||||
|     ) -> Iterator[Tuple[Union[str, EnumDescriptorProto], List[int]]]: | ||||
|         for i, item in enumerate(items): | ||||
|             # Adjust the name since we flatten the hierarchy. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user