Skip to content

Commit

Permalink
Shortcut version_size. (#14)
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <dblock@amazon.com>
  • Loading branch information
dblock authored Sep 8, 2023
1 parent 5325480 commit da946ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/opensearch_sdk_py/transport/stream_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def v_int_size(self, i: int) -> int:

@classmethod
def version_size(self, version: Version) -> int:
if version.id & Version.MASK:
return 4
return self.v_int_size(version.id)

def write_version(self, version: Version) -> int:
Expand Down

0 comments on commit da946ee

Please sign in to comment.