Skip to content

Pep8 violation in the code #101

@Drachenfels

Description

@Drachenfels

In some places, you have syntax like this:

if not xalign == None:

It's actually against Python coding standard -> https://stackoverflow.com/questions/14247373/python-none-comparison-should-i-use-is-or

Use either:

xalign is None

or

xalign is not None

Statement:

not xalign == None

Is a double whammy as it's using a double negation, and it's hard to follow when it's True and when it's False, imagine those cases:

not "" == None -> True
not None == None -> False
not 0 == None -> True
not 1 == None -> True
not False == None -> True

So perhaps simpler:

xalign is not None

would suffice?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions