Open Josh-2 opened 1 year ago
Type of Feature Request
Feature Description I was planning on proposing overloads (see below) for read and write but:
read
write
@overload def read(self, __tag: str) -> Tag: ... @overload def read(self, __tag: str, __tag_: str, *__tags: str) -> List[Tag]: ... @with_forward_open def read(self, *tags: str) -> ReadWriteReturnType: ... @overload def write(self, __tag: str, __value: TagValueType) -> Tag: ... @overload def write(self, __tags_values: Tuple[str, TagValueType]) -> Tag: ... @overload def write(self, __tags_value: Tuple[str, TagValueType], __tags_value_: Tuple[str, TagValueType], *__tags_values: Tuple[str, TagValueType]) -> List[Tag]: ... @with_forward_open def write( self, *tags_values: Union[str, TagValueType, Tuple[str, TagValueType]] ) -> ReadWriteReturnType:
Instead I am proposing the following changes.
Proposed Changes
read_one
read_many
write_one
write_many
I believe this change improves the readability and predictability of the code by making it clear what type each method will return.
@ottowayi I realize this is a very opinionated proposal. Is this something that you're interested in?
Type of Feature Request
Feature Description I was planning on proposing overloads (see below) for
read
andwrite
but:Instead I am proposing the following changes.
Proposed Changes
read
andwrite
methods intoread_one
,read_many
,write_one
, andwrite_many
read
andwrite
and update calls to useread_many
andwrite_many
while maintaining their existing functionalityI believe this change improves the readability and predictability of the code by making it clear what type each method will return.
@ottowayi I realize this is a very opinionated proposal. Is this something that you're interested in?