mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-02-08 23:32:21 +00:00
Pylint change
This commit is contained in:
parent
32391dd64d
commit
d36ef2bcf1
1 changed files with 5 additions and 6 deletions
|
@ -321,12 +321,11 @@ def infer_physical_format(format_text):
|
||||||
if format_text in format_mappings:
|
if format_text in format_mappings:
|
||||||
# try a direct match
|
# try a direct match
|
||||||
return format_mappings[format_text]
|
return format_mappings[format_text]
|
||||||
else:
|
# failing that, try substring
|
||||||
# failing that, try substring
|
matches = [v for k, v in format_mappings.items() if k in format_text]
|
||||||
matches = [v for k, v in format_mappings.items() if k in format_text]
|
if not matches:
|
||||||
if not matches:
|
return None
|
||||||
return None
|
return matches[0]
|
||||||
return matches[0]
|
|
||||||
|
|
||||||
|
|
||||||
def unique_physical_format(format_text):
|
def unique_physical_format(format_text):
|
||||||
|
|
Loading…
Reference in a new issue