summaryrefslogtreecommitdiff
path: root/mimeparse.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2021-10-26 20:33:17 +0200
committerFederico Caselli <cfederico87@gmail.com>2021-10-26 20:33:42 +0200
commitdff7bee0a2ee9d5a41fc2d285f7cf12d1432fd83 (patch)
tree455c29d7ca886090a6971924a15f43390b21de0f /mimeparse.py
parentcf605c0994149b1a1936b3a8a597203fe3fbb62e (diff)
downloadpython-mimeparse-dff7bee0a2ee9d5a41fc2d285f7cf12d1432fd83.tar.gz
Add github actions
Fixes: #39
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: