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
423d05f6
Unverified
Kaydet (Commit)
423d05f6
authored
Agu 11, 2018
tarafından
Berker Peksag
Kaydeden (comit)
GitHub
Agu 11, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-34333: Fix %-formatting in Path.with_suffix() (GH-8663)
üst
077059e0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
1 deletion
+5
-1
pathlib.py
Lib/pathlib.py
+1
-1
test_pathlib.py
Lib/test/test_pathlib.py
+2
-0
2018-08-04-00-06-28.bpo-34333.5NHG93.rst
...S.d/next/Library/2018-08-04-00-06-28.bpo-34333.5NHG93.rst
+2
-0
No files found.
Lib/pathlib.py
Dosyayı görüntüle @
423d05f6
...
...
@@ -813,7 +813,7 @@ class PurePath(object):
"""
f
=
self
.
_flavour
if
f
.
sep
in
suffix
or
f
.
altsep
and
f
.
altsep
in
suffix
:
raise
ValueError
(
"Invalid suffix
%
r"
%
(
suffix
))
raise
ValueError
(
"Invalid suffix
%
r"
%
(
suffix
,
))
if
suffix
and
not
suffix
.
startswith
(
'.'
)
or
suffix
==
'.'
:
raise
ValueError
(
"Invalid suffix
%
r"
%
(
suffix
))
name
=
self
.
name
...
...
Lib/test/test_pathlib.py
Dosyayı görüntüle @
423d05f6
...
...
@@ -577,6 +577,8 @@ class _BasePurePathTest(object):
self
.
assertRaises
(
ValueError
,
P
(
'a/b'
)
.
with_suffix
,
'.c/.d'
)
self
.
assertRaises
(
ValueError
,
P
(
'a/b'
)
.
with_suffix
,
'./.d'
)
self
.
assertRaises
(
ValueError
,
P
(
'a/b'
)
.
with_suffix
,
'.d/.'
)
self
.
assertRaises
(
ValueError
,
P
(
'a/b'
)
.
with_suffix
,
(
self
.
flavour
.
sep
,
'd'
))
def
test_relative_to_common
(
self
):
P
=
self
.
cls
...
...
Misc/NEWS.d/next/Library/2018-08-04-00-06-28.bpo-34333.5NHG93.rst
0 → 100644
Dosyayı görüntüle @
423d05f6
Fix %-formatting in :meth:`pathlib.PurePath.with_suffix` when formatting an
error message.
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