mirror of
https://github.com/python/cpython.git
synced 2025-08-28 04:35:02 +00:00
Remove a list comprehension, because a loop over the list
is done afterwards anyway, so what the list comp does can be done in the loop.
This commit is contained in:
parent
51cc72c6c0
commit
8fa8972d80
1 changed files with 1 additions and 2 deletions
|
@ -215,9 +215,8 @@ class MimeTypes:
|
||||||
if not words:
|
if not words:
|
||||||
continue
|
continue
|
||||||
type, suffixes = words[0], words[1:]
|
type, suffixes = words[0], words[1:]
|
||||||
suffixes = [ '.' + suff for suff in suffixes ]
|
|
||||||
for suff in suffixes:
|
for suff in suffixes:
|
||||||
self.add_type(type, suff, strict)
|
self.add_type(type, '.' + suff, strict)
|
||||||
|
|
||||||
def guess_type(url, strict=True):
|
def guess_type(url, strict=True):
|
||||||
"""Guess the type of a file based on its URL.
|
"""Guess the type of a file based on its URL.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue