Skip to content

Unreachable code in kiva.font_manager.is_string_like #394

@pbrod

Description

@pbrod

The lines

try:
obj + ''
except Exception:
return False
return True

are unreachable due to an indentation bug since they most likely should be reachable.

The if statement

if obj.ndim == 0 and obj.dtype.kind in 'SU':
return True
else:
return False

can be simplified. The if statement can be replaced with

return bool(obj.ndim == 0 and obj.dtype.kind in 'SU')

Metadata

Metadata

Assignees

No one assigned

    Labels

    ETS BacklogGood issue for ETS team members to look at

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions