Skip to content

Fix in `DefinedName.destinations` : changed to yield either quoted or notquoted sheet name (#714).

Bitbucket Importer requested to merge bitbucket/declined-pr-143 into branch/default

Created originally on Bitbucket by fumitoh (fumito hamamura)

Changesets for this Pull Request have not been imported, because it had been already declined on Bitbucket. Marked as closed by the import user.

In the previous code below, when a defined name refers to "'Sheet 1'!$A$1", None is returned as the first element of the tuple returned from a call to the generator destinations. m.group('quoted') instead of m.group('notquoted') should be returned in such cases.

#!python

# defined_name.py, line 133
    @property
    def destinations(self):
        if self.type == "RANGE":
            tok = Tokenizer("=" + self.value)
            for part in tok.items:
                if part.subtype == "RANGE":
                    m = SHEETRANGE_RE.match(part.value)
                    yield m.group('notquoted'), m.group('cells')

Merge request reports

Loading