-
Notifications
You must be signed in to change notification settings - Fork 551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refine BybitEnumParser
for Bybit
#2107
Refine BybitEnumParser
for Bybit
#2107
Conversation
CodSpeed Performance ReportMerging #2107 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks! @sunlei
@@ -537,50 +554,27 @@ def parse_bybit_order_type( | |||
def parse_nautilus_time_in_force(self, time_in_force: TimeInForce) -> BybitTimeInForce: | |||
try: | |||
return self.nautilus_to_bybit_time_in_force[time_in_force] | |||
except KeyError: | |||
except KeyError as exec: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To align with Rust, we standardized on using as e
for the exception variable name. (I'll refactor this after merging.)
@@ -145,3 +147,62 @@ def test_parse_nautilus_order_side( | |||
# ) -> None: | |||
# result = self._enum_parser.parse_nautilus_order_status(order_status) | |||
# assert result == bybit_order_status | |||
|
|||
@pytest.mark.parametrize( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, thank you 🙏
Pull Request
Refine
BybitEnumParser
for Bybit.Type of change
How has this change been tested?
Tests added.