Commit f13a2574 authored by Weblate's avatar Weblate

Merge remote-tracking branch 'origin/master'

parents a7f03add ab6c2be2
...@@ -168,7 +168,7 @@ class BaseFormatCheck(TargetCheck): ...@@ -168,7 +168,7 @@ class BaseFormatCheck(TargetCheck):
src_matches = self.get_cache(unit, cache_slot) src_matches = self.get_cache(unit, cache_slot)
# New style cache # New style cache
if type(src_matches) is tuple: if isinstance(src_matches, tuple):
uses_position, src_matches = src_matches uses_position, src_matches = src_matches
else: else:
src_matches = None src_matches = None
......
...@@ -46,7 +46,7 @@ class MyMemoryTranslation(MachineTranslation): ...@@ -46,7 +46,7 @@ class MyMemoryTranslation(MachineTranslation):
''' '''
Reformats match to (translation, quality) tuple. Reformats match to (translation, quality) tuple.
''' '''
if type(match['quality']) is int: if isinstance(match['quality'], int):
quality = match['quality'] quality = match['quality']
elif match['quality'] is not None and match['quality'].isdigit(): elif match['quality'] is not None and match['quality'].isdigit():
quality = int(match['quality']) quality = int(match['quality'])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment