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

Add console parameter to rich wrapper #1282

Closed
wants to merge 1 commit into from

Conversation

glensc
Copy link
Contributor

@glensc glensc commented Dec 19, 2021

@sourcery-ai
Copy link

sourcery-ai bot commented Dec 19, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 1.90 ⭐ 1.90 ⭐ 0.00
Method Length 41.50 ⭐ 41.83 ⭐ 0.33 👎
Working memory 6.89 🙂 7.13 🙂 0.24 👎
Quality 79.38% 78.73% -0.65% 👎
Other metrics Before After Change
Lines 128 128 0
Changed files Quality Before Quality After Quality Change
tqdm/rich.py 79.38% ⭐ 78.73% ⭐ -0.65% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
tqdm/rich.py tqdm_rich.__init__ 3 ⭐ 138 😞 9 🙂 63.30% 🙂 Try splitting into smaller methods
tqdm/rich.py RateColumn.render 4 ⭐ 89 🙂 11 😞 64.67% 🙂 Extract out complex expressions
tqdm/rich.py FractionColumn.render 3 ⭐ 88 🙂 10 😞 67.70% 🙂 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!

@glensc
Copy link
Contributor Author

glensc commented Feb 1, 2022

@casperdcl can you move this forward?

@glensc
Copy link
Contributor Author

glensc commented Feb 28, 2022

@casperdcl can you include this in the new version?

@casperdcl casperdcl self-assigned this Feb 28, 2022
@casperdcl casperdcl added c1-quick 🕐 Complexity low p3-enhancement 🔥 Much new such feature submodule ⊂ Periphery/subclasses to-merge ↰ Imminent labels Feb 28, 2022
@casperdcl
Copy link
Sponsor Member

Ah sorry for the delay :)

@casperdcl casperdcl added this to Next Release in Casper Feb 28, 2022
@glensc
Copy link
Contributor Author

glensc commented Mar 24, 2022

@casperdcl can you include this in next release please?

casperdcl added a commit that referenced this pull request Mar 26, 2022
@casperdcl casperdcl mentioned this pull request Mar 26, 2022
@casperdcl
Copy link
Sponsor Member

casperdcl commented Mar 26, 2022

thanks for pinging and sorry for the delay!

How about #1311 for more generic compatibility? i.e. tqdm.rich.tqdm(..., options={'console': True}) tqdm.rich.tqdm(..., options={'console': ...})

@casperdcl casperdcl added to-review 🔍 Awaiting final confirmation and removed to-merge ↰ Imminent labels Mar 26, 2022
@glensc
Copy link
Contributor Author

glensc commented Mar 27, 2022

I don't understand #1311 changes, also seems to be titled as 4.63.2 release notes, also console is not boolean, but an instance created elsewhere.

you can see the usage of this PR with the PR referred in PR body:

Needed by:

more particularly just this commit:

@casperdcl
Copy link
Sponsor Member

casperdcl commented Apr 3, 2022

Right so from next release, you could replace Taxel/PlexTraktSync@19297cd (#663) with essentially:

partial(tqdm.rich.tqdm, options={'console': plextraktsync.console.console})

@glensc
Copy link
Contributor Author

glensc commented Apr 3, 2022

Uh ok. either way is fine probably.

Casper automation moved this from Next Release to Done Apr 3, 2022
@glensc glensc deleted the 1766-tqdm-console branch April 4, 2022 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c1-quick 🕐 Complexity low p3-enhancement 🔥 Much new such feature submodule ⊂ Periphery/subclasses to-review 🔍 Awaiting final confirmation
Projects
Casper
  
Done
Development

Successfully merging this pull request may close these issues.

[REQUEST] Add console and highlighter parameters to tqdm wrapper.
2 participants