-
Notifications
You must be signed in to change notification settings - Fork 20
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
[ProfileData] fix dataclasses "mutable default for field is not allow… #427
base: master
Are you sure you want to change the base?
[ProfileData] fix dataclasses "mutable default for field is not allow… #427
Conversation
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.
Thank you fox the fix 👍
For now OctoBot ensures compatibility with python 3.10 in which this syntax is not an issue. However when updating to newer versions, this fix will be necessary !
@@ -111,9 +111,9 @@ class OptionsData(octobot_commons.dataclasses.FlexibleDataclass): | |||
class ProfileData(octobot_commons.dataclasses.MinimizableDataclass): | |||
profile_details: ProfileDetailsData | |||
crypto_currencies: list[CryptoCurrencyData] | |||
trading: TradingData | |||
trading: TradingData = dataclasses.field(default_factory=TradingData) |
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.
trading: TradingData = dataclasses.field(default_factory=TradingData) | |
trading: TradingData |
exchanges: list[ExchangeData] = dataclasses.field(default_factory=list) | ||
trader: TraderData = TraderData() | ||
trader: TraderData = dataclasses.field(default_factory=TraderData) |
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.
👍
Sure, I've just started trying it out, and I'm on 3.11. In case I trip again, do you want me to push a PR or refrain until you go 3.11? |
If you find other things to fix/improve on 3.11, it's always good to have them fixed already, plz make a PR ! |
59a1bfe
to
256812e
Compare
256812e
to
09a366b
Compare
…ed" error