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
ab54b9a1
Kaydet (Commit)
ab54b9a1
authored
Ock 03, 2019
tarafından
Emmanuel Arias
Kaydeden (comit)
Terry Jan Reedy
Ock 03, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-35641: IDLE - format calltip properly when no docstring (GH-11415)
üst
aff0adab
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
1 deletion
+32
-1
calltip.py
Lib/idlelib/calltip.py
+1
-1
test_calltip.py
Lib/idlelib/idle_test/test_calltip.py
+29
-0
ACKS
Misc/ACKS
+1
-0
2019-01-02-22-15-01.bpo-35641.QEaANl.rst
...S.d/next/Library/2019-01-02-22-15-01.bpo-35641.QEaANl.rst
+1
-0
No files found.
Lib/idlelib/calltip.py
Dosyayı görüntüle @
ab54b9a1
...
...
@@ -167,7 +167,7 @@ def get_argspec(ob):
if
len
(
line
)
>
_MAX_COLS
:
line
=
line
[:
_MAX_COLS
-
3
]
+
'...'
lines
.
append
(
line
)
argspec
=
'
\n
'
.
join
(
lines
)
argspec
=
'
\n
'
.
join
(
lines
)
if
not
argspec
:
argspec
=
_default_callable_argspec
return
argspec
...
...
Lib/idlelib/idle_test/test_calltip.py
Dosyayı görüntüle @
ab54b9a1
...
...
@@ -99,6 +99,35 @@ non-overlapping occurrences o...''')
drop_whitespace=True, break_on_hyphens=True, tabsize=8, *, max_lines=None,
placeholder=' [...]')'''
)
def
test_properly_formated
(
self
):
def
foo
(
s
=
'a'
*
100
):
pass
def
bar
(
s
=
'a'
*
100
):
"""Hello Guido"""
pass
def
baz
(
s
=
'a'
*
100
,
z
=
'b'
*
100
):
pass
indent
=
calltip
.
_INDENT
str_foo
=
"(s='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
\
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\n
"
+
indent
+
"aaaaaaaaa"
\
"aaaaaaaaaa')"
str_bar
=
"(s='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
\
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\n
"
+
indent
+
"aaaaaaaaa"
\
"aaaaaaaaaa')
\n
Hello Guido"
str_baz
=
"(s='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
\
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\n
"
+
indent
+
"aaaaaaaaa"
\
"aaaaaaaaaa', z='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
\
"bbbbbbbbbbbbbbbbb
\n
"
+
indent
+
"bbbbbbbbbbbbbbbbbbbbbb"
\
"bbbbbbbbbbbbbbbbbbbbbb')"
self
.
assertEqual
(
calltip
.
get_argspec
(
foo
),
str_foo
)
self
.
assertEqual
(
calltip
.
get_argspec
(
bar
),
str_bar
)
self
.
assertEqual
(
calltip
.
get_argspec
(
baz
),
str_baz
)
def
test_docline_truncation
(
self
):
def
f
():
pass
f
.
__doc__
=
'a'
*
300
...
...
Misc/ACKS
Dosyayı görüntüle @
ab54b9a1
...
...
@@ -60,6 +60,7 @@ Heidi Annexstad
Ramchandra Apte
Éric Araujo
Alexandru Ardelean
Emmanuel Arias
Alicia Arlen
Jeffrey Armstrong
Jason Asbahr
...
...
Misc/NEWS.d/next/Library/2019-01-02-22-15-01.bpo-35641.QEaANl.rst
0 → 100644
Dosyayı görüntüle @
ab54b9a1
Proper format `calltip` when the function has no docstring.
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