Skip to content

[IMPROVE] If statements for booleans/trilean state #27

Closed

Description

@CoMPaTech

Describe the improvement

Evaluate rewriting if something_somewhere is True: to if something. This goes for None, False and True (hence trilean). It won't be possible everywhere (we have a specific case in plugwise-beta where we needed it like that, but most of them should be rewritable in python-plugwise.

From findings during #24

Activity

  1. added
    bug
    enhancement
    invalid
    on Oct 30, 2020
  2. bouwew commented on Oct 30, 2020

    @bouwew
    Contributor

    Let's be careful with shortening if something is None: and if something is not None:.
    I remember from the early days that in many cases we had to use/leave it at if something is not None: to obtain the wanted result.

  3. CoMPaTech commented on Oct 30, 2020

    @CoMPaTech
    MemberAuthor

    Yup, hence the reference to our earlier experience :)

  4. bouwew commented on Nov 1, 2020

    @bouwew
    Contributor

    Fixed in #30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenhancementinvalid

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions