8000 --strict-equality should be more flexible · Issue #6607 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content
--strict-equality should be more flexible #6607
@ilevkivskyi

Description

@ilevkivskyi

Currently, --strict-equality is all or nothing. People typically want it for particular situations like str vs bytes for Python 2 to 3 migration, int vs float for numeric code, etc. It looks like there are at least two options:

  1. Split the flag into several separate flags for most common use cases, similar to how it is done for --disallow-any-xxx flags.
  2. Make it a flag with arguments, similar to how it is done for --always-true/--always-false.

I personally prefer the second option, since it is more flexible. Plus I could imagine a use case with user defined types: one might want to disable comparisons after migration from a legacy API.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0