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

Some simple improvements #80

Open
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

rdbende
Copy link
Member

@rdbende rdbende commented Mar 25, 2021

No description provided.

@codecov
Copy link

codecov bot commented Mar 25, 2021

Codecov Report

Merging #80 (3f8ac80) into master (1a8ce0c) will decrease coverage by 0.26%.
The diff coverage is 79.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #80       /-   ##
==========================================
- Coverage   89.51%   89.24%   -0.27%     
==========================================
  Files          43       43              
  Lines        4026     4065       39     
==========================================
  Hits         3604     3628       24     
- Misses        422      437       15     
Impacted Files Coverage Δ
ttkwidgets/frames/toggledframe.py 75.92% <72.91%> (-24.08%) ⬇️
ttkwidgets/linklabel.py 93.54% <89.28%> (-2.89%) ⬇️
ttkwidgets/itemscanvas.py 95.77% <100.00%> (ø)
ttkwidgets/checkboxtreeview.py 93.18% <0.00%> ( 0.32%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1a8ce0c...3f8ac80. Read the comment docs.

Since Tk 8.6 supports png, I don't think it's actually necessary to use PIL. I hope no one uses Tk 8.5 these days.
I know I forgot something very important but I can't remember what it is.
Copy link
Member

@RedFantom RedFantom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your commits, @rdbende ! Almost everything looks good, just a couple comments on the LinkLabel changes. See also my commit on rdbende-improvements branch.

ttkwidgets/linklabel.py Outdated Show resolved Hide resolved
ttkwidgets/linklabel.py Outdated Show resolved Hide resolved
ttkwidgets/linklabel.py Show resolved Hide resolved
ttkwidgets/linklabel.py Outdated Show resolved Hide resolved
RedFantom added a commit that referenced this pull request Dec 13, 2022
@rdbende
Copy link
Member Author

rdbende commented Dec 13, 2022

And while we are here, shouldn't we replace the uses of kwargs.pop with individual keyword arguments, and default values? After all, ttkwidgets needs Python 3, so it's not a big deal. (In a separate PR of course).

assert frame.opened
frame.close()
self.window.update()
assert not frame.opened
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are good reasons to use assertTrue, assertFalse, assertEquals, and so on, so it's important that they are not changed. See also here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use Pytest as test runner, which prefers the assert keyword, and logs usable output with it, but I see we're using Nose here, so I'll rewrite it.

ttkwidgets/frames/toggledframe.py Show resolved Hide resolved
from ttkwidgets.utilities import get_assets_directory

assets_dir = Path(get_assets_directory())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the use of pathlib, but why does it have to be a global variable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I thought I might need it elsewhere, but it turns out I didn't.

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.

2 participants