diff options
author | Federico Caselli <CaselIT@users.noreply.github.com> | 2021-10-27 18:02:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-27 18:02:39 +0200 |
commit | 1222900157502624f3c9774c81bac1e096ea88b0 (patch) | |
tree | a449a8bb94a3582674b1ea1d5624039cb2585f10 /mimeparse.py | |
parent | cf605c0994149b1a1936b3a8a597203fe3fbb62e (diff) | |
download | python-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.py | 11 |
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: |