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
05b55e76
Kaydet (Commit)
05b55e76
authored
Haz 03, 1992
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix pnm test for short files and add X bitmap as recognized type
üst
d482e8ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
imghdr.py
Lib/imghdr.py
+10
-1
No files found.
Lib/imghdr.py
Dosyayı görüntüle @
05b55e76
...
...
@@ -37,7 +37,8 @@ tests.append(test_gif)
def
test_pnm
(
h
,
f
):
# PBM, PGM, PPM (portable {bit,gray,pix}map; together portable anymap)
if
h
[
0
]
==
'P'
and
h
[
1
]
in
'123456'
and
h
[
2
]
in
'
\t\n\r
'
:
if
len
(
h
)
>=
3
and
\
h
[
0
]
==
'P'
and
h
[
1
]
in
'123456'
and
h
[
2
]
in
'
\t\n\r
'
:
return
'pnm'
tests
.
append
(
test_pnm
)
...
...
@@ -56,6 +57,14 @@ def test_rast(h, f):
tests
.
append
(
test_rast
)
def
test_xbm
(
h
,
f
):
# X bitmap (X10 or X11)
s
=
'#define '
if
h
[:
len
(
s
)]
==
s
:
return
'xbm'
tests
.
append
(
test_xbm
)
#--------------------#
# Small test program #
...
...
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