utilmon / EasyIB

Python wrapper for Interactive Brokers Client Portal Web API
BSD 3-Clause "New" or "Revised" License
89 stars 24 forks source link

Feature: add ability to filter instruments and contracts (Sourcery refactored) #8

Closed sourcery-ai[bot] closed 2 years ago

sourcery-ai[bot] commented 2 years ago

Pull Request #7 refactored by Sourcery.

Since the original Pull Request was opened as a fork in a contributor's repository, we are unable to create a Pull Request branching from it.

To incorporate these changes, you can either:

  1. Merge this Pull Request instead of the original, or

  2. Ask your contributor to locally incorporate these commits and push them to the original Pull Request

    Incorporate changes via command line
    git fetch https://github.com/ashpipe/EasyIB pull/7/head
    git merge --ff-only FETCH_HEAD
    git push

NOTE: As code is pushed to the original Pull Request, Sourcery will re-run and update (force-push) this Pull Request with new refactorings as necessary. If Sourcery finds no refactorings at any point, this Pull Request will be closed automatically.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Help us improve this pull request!

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 6.65%.

Quality metrics Before After Change
Complexity 0.62 ⭐ 2.82 ⭐ 2.20 👎
Method Length 39.50 ⭐ 44.77 ⭐ 5.27 👎
Working memory 6.16 ⭐ 4.91 ⭐ -1.25 👍
Quality 85.66% 79.01% -6.65% 👎
Other metrics Before After Change
Lines 277 309 32
Changed files Quality Before Quality After Quality Change
src/easyib/easyib.py 85.66% ⭐ 79.01% ⭐ -6.65% 👎

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 🙂 166 😞 50.10% 🙂 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:

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!