Skip to content

Syntax warning from __init__.py: assert file != "" is not None  #166

Open
@juliangilbey

Description

@juliangilbey

assert file != "" is not None, "No input specified"

raises the followng warning:

SyntaxWarning: "is not" with a literal. Did you mean "!="?
  assert file != "" is not None, "No input specified"

The code as written means: assert (file != "") and ("" is not None), which is clearly not what is wanted; perhaps it should be assert (file != "") and (file is not None) instead?

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