Skip to content

'IntEnum' values from different types compare equal #247

@tseaver

Description

@tseaver

For instance:

from google.cloud.firestore_v1.types import StructuredQuery

greater_than = StructuredQuery.FieldFilter.Operator.GREATER_THAN
is_null = StructuredQuery.UnaryFilter.Operator.IS_NULL

assert greater_than != is_null  # fails

This "false equivalence" is the source of googleapis/python-firestore#429

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions