Skip to content
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

Using BASE instead of hardcoded USD currency #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zerola
Copy link

@zerola zerola commented Mar 14, 2023

There is hardcoded USD currency in several methods, which causes problems with accounts of different than USD currency. We can use BASE - which represents base currency of the account. In case of holding multiple currencies this will also reflect to the total cash value represented by the BASE currency.

@sourcery-ai
Copy link

sourcery-ai bot commented Mar 14, 2023

Sourcery Code Quality Report

Merging this PR leaves code quality unchanged.

Quality metrics Before After Change
Complexity 2.75 ⭐ 2.75 ⭐ 0.00
Method Length 45.91 ⭐ 45.91 ⭐ 0.00
Working memory 4.86 ⭐ 4.86 ⭐ 0.00
Quality 79.38% 79.38% 0.00%
Other metrics Before After Change
Lines 331 331 0
Changed files Quality Before Quality After Quality Change
src/easyib/easyib.py 79.38% ⭐ 79.38% ⭐ 0.00%

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
src/easyib/easyib.py REST.get_conid 12 🙂 168 😞 49.82% 😞 Try splitting into smaller methods
src/easyib/easyib.py REST.get_bars 2 ⭐ 71 🙂 11 😞 69.31% 🙂 Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant