Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix subscriptable type usage in Python <3.9 #15604

Merged
merged 3 commits into from
May 16, 2023

Commits on May 15, 2023

  1. Fix subscriptable dict type

    Fix:
    ```
    tests/test_state.py:267: error: "dict" is not subscriptable, use "typing.Dict" instead  [misc]
    ```
    
    In Python 3.9, `typing` is deprecated and the types are subscriptable (generics) by default,
    https://peps.python.org/pep-0585/#implementation
    MadLittleMods committed May 15, 2023
    Configuration menu
    Copy the full SHA
    3574071 View commit details
    Browse the repository at this point in the history
  2. Fix subscriptable Counter usage in Python <3.9

    Fix:
    ```
    synapse/storage/controllers/stats.py:58: error: "Counter" is not subscriptable, use "typing.Counter" instead  [misc]
    ```
    MadLittleMods committed May 15, 2023
    Configuration menu
    Copy the full SHA
    2291104 View commit details
    Browse the repository at this point in the history
  3. Add changelog

    MadLittleMods committed May 15, 2023
    Configuration menu
    Copy the full SHA
    113455e View commit details
    Browse the repository at this point in the history