Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
2b751555
Unverified
Kaydet (Commit)
2b751555
authored
Mar 23, 2019
tarafından
Terry Jan Reedy
Kaydeden (comit)
GitHub
Mar 23, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-36405: Use dict unpacking in idlelib (#12507)
Remove now unneeded imports.
üst
7a2e84c3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
12 deletions
+9
-12
NEWS.txt
Lib/idlelib/NEWS.txt
+2
-0
autocomplete.py
Lib/idlelib/autocomplete.py
+3
-7
calltip.py
Lib/idlelib/calltip.py
+3
-5
2019-03-23-01-45-56.bpo-36405.m7Wv1F.rst
...NEWS.d/next/IDLE/2019-03-23-01-45-56.bpo-36405.m7Wv1F.rst
+1
-0
No files found.
Lib/idlelib/NEWS.txt
Dosyayı görüntüle @
2b751555
...
...
@@ -3,6 +3,8 @@ Released on 2019-10-20?
======================================
bpo-36405: Use dict unpacking in idlelib and remove unneeded __main__ imports.
bpo-36396: Remove fgBg param of idlelib.config.GetHighlight().
This param was only used twice and changed the return type.
...
...
Lib/idlelib/autocomplete.py
Dosyayı görüntüle @
2b751555
...
...
@@ -14,7 +14,6 @@ COMPLETE_ATTRIBUTES, COMPLETE_FILES = range(1, 2+1)
from
idlelib
import
autocomplete_w
from
idlelib.config
import
idleConf
from
idlelib.hyperparser
import
HyperParser
import
__main__
# This string includes all chars that may be in an identifier.
# TODO Update this here and elsewhere.
...
...
@@ -182,8 +181,7 @@ class AutoComplete:
else
:
if
mode
==
COMPLETE_ATTRIBUTES
:
if
what
==
""
:
namespace
=
__main__
.
__dict__
.
copy
()
namespace
.
update
(
__main__
.
__builtins__
.
__dict__
)
namespace
=
{
**
__builtins__
.
__dict__
,
**
globals
()}
bigl
=
eval
(
"dir()"
,
namespace
)
bigl
.
sort
()
if
"__all__"
in
bigl
:
...
...
@@ -218,10 +216,8 @@ class AutoComplete:
return
smalll
,
bigl
def
get_entity
(
self
,
name
):
"""Lookup name in a namespace spanning sys.modules and __main.dict__"""
namespace
=
sys
.
modules
.
copy
()
namespace
.
update
(
__main__
.
__dict__
)
return
eval
(
name
,
namespace
)
"Lookup name in a namespace spanning sys.modules and globals()."
return
eval
(
name
,
{
**
sys
.
modules
,
**
globals
()})
AutoComplete
.
reload
()
...
...
Lib/idlelib/calltip.py
Dosyayı görüntüle @
2b751555
...
...
@@ -12,7 +12,6 @@ import types
from
idlelib
import
calltip_w
from
idlelib.hyperparser
import
HyperParser
import
__main__
class
Calltip
:
...
...
@@ -100,13 +99,12 @@ class Calltip:
def
get_entity
(
expression
):
"""Return the object corresponding to expression evaluated
in a namespace spanning sys.modules and
__main.dict__
.
in a namespace spanning sys.modules and
globals()
.
"""
if
expression
:
namespace
=
sys
.
modules
.
copy
()
namespace
.
update
(
__main__
.
__dict__
)
namespace
=
{
**
sys
.
modules
,
**
globals
()}
try
:
return
eval
(
expression
,
namespace
)
return
eval
(
expression
,
namespace
)
# Only protect user code.
except
BaseException
:
# An uncaught exception closes idle, and eval can raise any
# exception, especially if user classes are involved.
...
...
Misc/NEWS.d/next/IDLE/2019-03-23-01-45-56.bpo-36405.m7Wv1F.rst
0 → 100644
Dosyayı görüntüle @
2b751555
Use dict unpacking in idlelib and remove unneeded __main__ imports.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment