Skip to content

using .split() on a six.string_types isn't supported #1525

@timabbott

Description

@timabbott

mypy doesn't like this code:

if isinstance(data, six.string_types):                                                                                 
        data = data.split(',')                                                                                             

with this error:

zerver/lib/actions.py: note: In function "extract_recipients":
zerver/lib/actions.py:789: error: "basestring" has no attribute "split"

I haven't had a chance yet to investigate whether "split" should be supported on basestring objects (and thus it's a stub issue) or whether the code is wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions