summaryrefslogtreecommitdiff
path: root/mimeparse.py
diff options
context:
space:
mode:
authorFederico Caselli <CaselIT@users.noreply.github.com>2021-10-27 18:02:39 +0200
committerGitHub <noreply@github.com>2021-10-27 18:02:39 +0200
commit1222900157502624f3c9774c81bac1e096ea88b0 (patch)
treea449a8bb94a3582674b1ea1d5624039cb2585f10 /mimeparse.py
parentcf605c0994149b1a1936b3a8a597203fe3fbb62e (diff)
downloadpython-mimeparse-1222900157502624f3c9774c81bac1e096ea88b0.tar.gz
chore: add github actions (#42)
* Add github actions Fixes: #39 * Fix workflow
Diffstat (limited to 'mimeparse.py')
-rw-r--r--mimeparse.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/mimeparse.py b/mimeparse.py
index 0218553..0de6d57 100644
--- a/mimeparse.py
+++ b/mimeparse.py
@@ -85,14 +85,9 @@ def quality_and_fitness_parsed(mime_type, parsed_ranges):
for (type, subtype, params) in parsed_ranges:
# check if the type and the subtype match
- type_match = (
- type in (target_type, '*') or
- target_type == '*'
- )
- subtype_match = (
- subtype in (target_subtype, '*') or
- target_subtype == '*'
- )
+ type_match = type in (target_type, '*') or target_type == '*'
+
+ subtype_match = subtype in (target_subtype, '*') or target_subtype == '*'
# if they do, assess the "fitness" of this mime_type
if type_match and subtype_match: