mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Simple Python 3 compatibility changes
Summary: Changes that move towards python 3 compatibility that are easy to review without much thought Test Plan: The tests Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2873
This commit is contained in:
@@ -11,6 +11,8 @@ import bisect
|
||||
import re
|
||||
from collections import namedtuple
|
||||
|
||||
import six
|
||||
|
||||
Patch = namedtuple('Patch', ('start', 'end', 'old_text', 'new_text'))
|
||||
|
||||
line_start_re = re.compile(r'^', re.M)
|
||||
@@ -176,4 +178,4 @@ class Combiner(Builder):
|
||||
offset = self._offsets[start_index - 1]
|
||||
part = self._parts[start_index - 1]
|
||||
in_patch = Patch(patch.start - offset, patch.end - offset, patch.old_text, patch.new_text)
|
||||
return None if isinstance(part, basestring) else part.map_back_patch(in_patch)
|
||||
return None if isinstance(part, six.string_types) else part.map_back_patch(in_patch)
|
||||
|
||||
Reference in New Issue
Block a user