Skip to content

bpo-31649: Make IDLE's _htest, _utest parameters keyword-only. #3839

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

Merged
merged 2 commits into from
Sep 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/idlelib/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ModuleBrowser:
# This class is the base class for pathbrowser.PathBrowser.
# Init and close are inherited, other methods are overriden.

def __init__(self, flist, name, path, _htest=False, _utest=False):
def __init__(self, flist, name, path, *, _htest=False, _utest=False):
# XXX This API should change, if the file doesn't end in ".py"
# XXX the code here is bogus!
"""Create a window for browsing a module's structure.
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/config_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class GetKeysDialog(Toplevel):
keyerror_title = 'Key Sequence Error'

def __init__(self, parent, title, action, currentKeySequences,
_htest=False, _utest=False):
*, _htest=False, _utest=False):
"""
action - string, the name of the virtual event these keys will be
mapped to
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/configdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ConfigDialog(Toplevel):
"""Config dialog for IDLE.
"""

def __init__(self, parent, title='', _htest=False, _utest=False):
def __init__(self, parent, title='', *, _htest=False, _utest=False):
"""Show the tabbed dialog for user configuration.

Args:
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/help_about.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AboutDialog(Toplevel):
"""Modal about dialog for idle

"""
def __init__(self, parent, title=None, _htest=False, _utest=False):
def __init__(self, parent, title=None, *, _htest=False, _utest=False):
"""Create popup, do not return until tk widget destroyed.

parent - parent of this dialog
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/pathbrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class PathBrowser(ModuleBrowser):

def __init__(self, flist, _htest=False, _utest=False):
def __init__(self, flist, *, _htest=False, _utest=False):
"""
_htest - bool, change box location when running htest
"""
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/textview.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ViewWindow(Toplevel):
"A simple text viewer dialog for IDLE."

def __init__(self, parent, title, text, modal=True,
_htest=False, _utest=False):
*, _htest=False, _utest=False):
"""Show the given text in a scrollable window with a 'close' button.

If modal is left True, users cannot interact with other windows
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IDLE - Make _htest, _utest parameters keyword only.