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

python_shell: Pass __init__ keyword arguments also to _create_control #451

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

janvonrickenbach
Copy link

Not really sure if this is the best way to do it. I would like to pass arguments to the PyShell.init function.

@codecov-io
Copy link

codecov-io commented Sep 23, 2019

Codecov Report

Merging #451 into master will decrease coverage by 0.01%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #451      +/-   ##
==========================================
- Coverage   36.63%   36.61%   -0.02%     
==========================================
  Files         481      481              
  Lines       26424    26424              
  Branches     3917     3917              
==========================================
- Hits         9680     9676       -4     
- Misses      16321    16323       +2     
- Partials      423      425       +2
Impacted Files Coverage Δ
pyface/ui/wx/python_shell.py 25% <33.33%> (ø) ⬆️
pyface/ui/qt4/util/modal_dialog_tester.py 86.46% <0%> (-3.01%) ⬇️

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 1b5bebb...a328392. Read the comment docs.

@corranwebster
Copy link
Contributor

Thanks for the contribution!

As you note, this probably isn't the best way to do it; in particular the keyword args are going to be wxPython-specific and so will break compatibility with the equivalent Qt toolkit widgets; and they also conflict with the way Traits initialises objects (notice that **traits is used in the super call - that is no accident).

Which keyword arguments (ie. which features) are you particularly needing? With a little bit more work it may be possible to support them on both back-ends, probably by adding some additional Traits that reflect those particular needs.

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.

3 participants