Skip to content

Commit bfebfd8

Browse files
authored
bpo-31649: Make IDLE's _htest, _utest parameters keyword-only. (#3839)
1 parent 7dc46d8 commit bfebfd8

File tree

7 files changed

+7
-6
lines changed

7 files changed

+7
-6
lines changed

Lib/idlelib/browser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class ModuleBrowser:
6161
# This class is the base class for pathbrowser.PathBrowser.
6262
# Init and close are inherited, other methods are overriden.
6363

64-
def __init__(self, flist, name, path, _htest=False, _utest=False):
64+
def __init__(self, flist, name, path, *, _htest=False, _utest=False):
6565
# XXX This API should change, if the file doesn't end in ".py"
6666
# XXX the code here is bogus!
6767
"""Create a window for browsing a module's structure.

Lib/idlelib/config_key.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class GetKeysDialog(Toplevel):
1414
keyerror_title = 'Key Sequence Error'
1515

1616
def __init__(self, parent, title, action, currentKeySequences,
17-
_htest=False, _utest=False):
17+
*, _htest=False, _utest=False):
1818
"""
1919
action - string, the name of the virtual event these keys will be
2020
mapped to

Lib/idlelib/configdialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ConfigDialog(Toplevel):
4141
"""Config dialog for IDLE.
4242
"""
4343

44-
def __init__(self, parent, title='', _htest=False, _utest=False):
44+
def __init__(self, parent, title='', *, _htest=False, _utest=False):
4545
"""Show the tabbed dialog for user configuration.
4646
4747
Args:

Lib/idlelib/help_about.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class AboutDialog(Toplevel):
2323
"""Modal about dialog for idle
2424
2525
"""
26-
def __init__(self, parent, title=None, _htest=False, _utest=False):
26+
def __init__(self, parent, title=None, *, _htest=False, _utest=False):
2727
"""Create popup, do not return until tk widget destroyed.
2828
2929
parent - parent of this dialog

Lib/idlelib/pathbrowser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class PathBrowser(ModuleBrowser):
1111

12-
def __init__(self, flist, _htest=False, _utest=False):
12+
def __init__(self, flist, *, _htest=False, _utest=False):
1313
"""
1414
_htest - bool, change box location when running htest
1515
"""

Lib/idlelib/textview.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class ViewWindow(Toplevel):
5757
"A simple text viewer dialog for IDLE."
5858

5959
def __init__(self, parent, title, text, modal=True,
60-
_htest=False, _utest=False):
60+
*, _htest=False, _utest=False):
6161
"""Show the given text in a scrollable window with a 'close' button.
6262
6363
If modal is left True, users cannot interact with other windows
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
IDLE - Make _htest, _utest parameters keyword only.

0 commit comments

Comments
 (0)