Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-5257

enforce typed containers in type checkers

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Typing
    • None
    • None
    • Python Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      A user commented on how pyright raises errors on partially unknown types (for example Mapping and List instead of Mapping[str, Any] and List[int])

      It would be nice to eventually turn on the appropriate flags in mypy (disallow_any_generics) and pyright (reportMissingTypeArgument) that enforces typed containers.

      As of the creation of this ticket, turning on the flag in pyright seemed to produce ~250 errors (and i'd guess about half of these errors are duplicated sync errors)

            Assignee:
            Unassigned Unassigned
            Reporter:
            iris.ho@mongodb.com Iris Ho
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None