KEMBAR78
Use lower-case generics more consistently in error messages by JukkaL · Pull Request #17035 · python/mypy · GitHub
Skip to content

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Mar 15, 2024

Suggest list[x] instead of List[x] on Python 3.9 and later in hints. We already suggest x | None instead of Optional[x] on 3.10+, so this makes the error messages more consistent.

Use lower-case type[x] when using reveal_type on Python 3.9 and later.

Suggest `list[x]` instead of `List[x]` on Python 3.9 and later in hints.
We already suggest `x | None` instead of `Optional[x]` on 3.10+, so
this makes the error messages more consistent.

Use lower-case `type[x]` when using `reveal_type` on Python 3.9 and later.
@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

comtypes (https://github.com/enthought/comtypes)
- comtypes/safearray.py:8: error: Need type annotation for "_safearray_type_cache" (hint: "_safearray_type_cache: Dict[<type>, <type>] = ...")  [var-annotated]
+ comtypes/safearray.py:8: error: Need type annotation for "_safearray_type_cache" (hint: "_safearray_type_cache: dict[<type>, <type>] = ...")  [var-annotated]
- comtypes/_comobject.py:314: error: Need type annotation for "_vtbl_types" (hint: "_vtbl_types: Dict[<type>, <type>] = ...")  [var-annotated]
+ comtypes/_comobject.py:314: error: Need type annotation for "_vtbl_types" (hint: "_vtbl_types: dict[<type>, <type>] = ...")  [var-annotated]
- comtypes/_comobject.py:414: error: Need type annotation for "_instances_" (hint: "_instances_: Dict[<type>, <type>] = ...")  [var-annotated]
+ comtypes/_comobject.py:414: error: Need type annotation for "_instances_" (hint: "_instances_: dict[<type>, <type>] = ...")  [var-annotated]
- comtypes/__init__.py:235: error: Need type annotation for "com_coclass_registry" (hint: "com_coclass_registry: Dict[<type>, <type>] = ...")  [var-annotated]
+ comtypes/__init__.py:235: error: Need type annotation for "com_coclass_registry" (hint: "com_coclass_registry: dict[<type>, <type>] = ...")  [var-annotated]
- comtypes/__init__.py:850: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: List[<type>] = ...")  [var-annotated]
+ comtypes/__init__.py:850: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: list[<type>] = ...")  [var-annotated]
- comtypes/persist.py:24: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: List[<type>] = ...")  [var-annotated]
+ comtypes/persist.py:24: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: list[<type>] = ...")  [var-annotated]
- comtypes/persist.py:38: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: List[<type>] = ...")  [var-annotated]
+ comtypes/persist.py:38: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: list[<type>] = ...")  [var-annotated]
- comtypes/persist.py:65: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: List[<type>] = ...")  [var-annotated]
+ comtypes/persist.py:65: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: list[<type>] = ...")  [var-annotated]
- comtypes/persist.py:110: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: List[<type>] = ...")  [var-annotated]
+ comtypes/persist.py:110: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: list[<type>] = ...")  [var-annotated]
- comtypes/persist.py:156: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: List[<type>] = ...")  [var-annotated]
+ comtypes/persist.py:156: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: list[<type>] = ...")  [var-annotated]
- comtypes/persist.py:216: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: List[<type>] = ...")  [var-annotated]
+ comtypes/persist.py:216: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: list[<type>] = ...")  [var-annotated]
- comtypes/connectionpoints.py:22: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: List[<type>] = ...")  [var-annotated]
+ comtypes/connectionpoints.py:22: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: list[<type>] = ...")  [var-annotated]
- comtypes/connectionpoints.py:27: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: List[<type>] = ...")  [var-annotated]
+ comtypes/connectionpoints.py:27: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: list[<type>] = ...")  [var-annotated]
- comtypes/connectionpoints.py:32: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: List[<type>] = ...")  [var-annotated]
+ comtypes/connectionpoints.py:32: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: list[<type>] = ...")  [var-annotated]
- comtypes/connectionpoints.py:46: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: List[<type>] = ...")  [var-annotated]
+ comtypes/connectionpoints.py:46: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: list[<type>] = ...")  [var-annotated]
- comtypes/tools/tlbparser.py:194: error: Need type annotation for "members" (hint: "members: List[<type>] = ...")  [var-annotated]
+ comtypes/tools/tlbparser.py:194: error: Need type annotation for "members" (hint: "members: list[<type>] = ...")  [var-annotated]
- comtypes/tools/tlbparser.py:358: error: Need type annotation for "members" (hint: "members: List[<type>] = ...")  [var-annotated]
+ comtypes/tools/tlbparser.py:358: error: Need type annotation for "members" (hint: "members: list[<type>] = ...")  [var-annotated]
- comtypes/tools/tlbparser.py:520: error: Need type annotation for "NEGATIVE_NAMES" (hint: "NEGATIVE_NAMES: Dict[<type>, <type>] = ...")  [var-annotated]
+ comtypes/tools/tlbparser.py:520: error: Need type annotation for "NEGATIVE_NAMES" (hint: "NEGATIVE_NAMES: dict[<type>, <type>] = ...")  [var-annotated]
- comtypes/tools/tlbparser.py:581: error: Need type annotation for "members" (hint: "members: List[<type>] = ...")  [var-annotated]
+ comtypes/tools/tlbparser.py:581: error: Need type annotation for "members" (hint: "members: list[<type>] = ...")  [var-annotated]
- comtypes/tools/codegenerator.py:548: error: Need type annotation for "more" (hint: "more: Set[<type>] = ...")  [var-annotated]
+ comtypes/tools/codegenerator.py:548: error: Need type annotation for "more" (hint: "more: set[<type>] = ...")  [var-annotated]
- comtypes/tools/codegenerator.py:1014: error: Need type annotation for "implemented" (hint: "implemented: List[<type>] = ...")  [var-annotated]
+ comtypes/tools/codegenerator.py:1014: error: Need type annotation for "implemented" (hint: "implemented: list[<type>] = ...")  [var-annotated]
- comtypes/tools/codegenerator.py:1015: error: Need type annotation for "sources" (hint: "sources: List[<type>] = ...")  [var-annotated]
+ comtypes/tools/codegenerator.py:1015: error: Need type annotation for "sources" (hint: "sources: list[<type>] = ...")  [var-annotated]
- comtypes/tools/codegenerator.py:1149: error: Need type annotation for "methods" (hint: "methods: Dict[<type>, <type>] = ...")  [var-annotated]
+ comtypes/tools/codegenerator.py:1149: error: Need type annotation for "methods" (hint: "methods: dict[<type>, <type>] = ...")  [var-annotated]
- comtypes/viewobject.py:81: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: List[<type>] = ...")  [var-annotated]
+ comtypes/viewobject.py:81: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: list[<type>] = ...")  [var-annotated]
- comtypes/viewobject.py:142: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: List[<type>] = ...")  [var-annotated]
+ comtypes/viewobject.py:142: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: list[<type>] = ...")  [var-annotated]
- comtypes/viewobject.py:159: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: List[<type>] = ...")  [var-annotated]
+ comtypes/viewobject.py:159: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: list[<type>] = ...")  [var-annotated]
- comtypes/shelllink.py:261: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: List[<type>] = ...")  [var-annotated]
+ comtypes/shelllink.py:261: error: Need type annotation for "_idlflags_" (hint: "_idlflags_: list[<type>] = ...")  [var-annotated]
- comtypes/test/__init__.py:55: error: Need type annotation for "_unavail" (hint: "_unavail: Dict[<type>, <type>] = ...")  [var-annotated]
+ comtypes/test/__init__.py:55: error: Need type annotation for "_unavail" (hint: "_unavail: dict[<type>, <type>] = ...")  [var-annotated]
- comtypes/server/inprocserver.py:40: error: Need type annotation for "_clsid_to_class" (hint: "_clsid_to_class: Dict[<type>, <type>] = ...")  [var-annotated]
+ comtypes/server/inprocserver.py:40: error: Need type annotation for "_clsid_to_class" (hint: "_clsid_to_class: dict[<type>, <type>] = ...")  [var-annotated]

antidote (https://github.com/Finistere/antidote)
- docs/conf.py:177: error: Need type annotation for "latex_elements" (hint: "latex_elements: Dict[<type>, <type>] = ...")  [var-annotated]
+ docs/conf.py:177: error: Need type annotation for "latex_elements" (hint: "latex_elements: dict[<type>, <type>] = ...")  [var-annotated]

manticore (https://github.com/trailofbits/manticore)
- tests/wasm/json2mc.py:63: error: Need type annotation for "modules" (hint: "modules: List[<type>] = ...")  [var-annotated]
+ tests/wasm/json2mc.py:63: error: Need type annotation for "modules" (hint: "modules: list[<type>] = ...")  [var-annotated]
- tests/auto_generators/make_tests.py:18: error: Need type annotation for "op_count" (hint: "op_count: Dict[<type>, <type>] = ...")  [var-annotated]
+ tests/auto_generators/make_tests.py:18: error: Need type annotation for "op_count" (hint: "op_count: dict[<type>, <type>] = ...")  [var-annotated]

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/_version.py:54: error: Need type annotation for "LONG_VERSION_PY" (hint: "LONG_VERSION_PY: Dict[<type>, <type>] = ...")  [var-annotated]
+ src/prefect/_version.py:54: error: Need type annotation for "LONG_VERSION_PY" (hint: "LONG_VERSION_PY: dict[<type>, <type>] = ...")  [var-annotated]
- src/prefect/_internal/concurrency/cancellation.py:145: error: Need type annotation for "_callbacks" (hint: "_callbacks: List[<type>] = ...")  [var-annotated]
+ src/prefect/_internal/concurrency/cancellation.py:145: error: Need type annotation for "_callbacks" (hint: "_callbacks: list[<type>] = ...")  [var-annotated]
- src/prefect/_internal/concurrency/calls.py:78: error: Need type annotation for "_cancel_callbacks" (hint: "_cancel_callbacks: List[<type>] = ...")  [var-annotated]
+ src/prefect/_internal/concurrency/calls.py:78: error: Need type annotation for "_cancel_callbacks" (hint: "_cancel_callbacks: list[<type>] = ...")  [var-annotated]
- src/prefect/_internal/concurrency/waiters.py:120: error: Need type annotation for "_done_callbacks" (hint: "_done_callbacks: List[<type>] = ...")  [var-annotated]
+ src/prefect/_internal/concurrency/waiters.py:120: error: Need type annotation for "_done_callbacks" (hint: "_done_callbacks: list[<type>] = ...")  [var-annotated]
- src/prefect/_internal/concurrency/waiters.py:189: error: Need type annotation for "_done_callbacks" (hint: "_done_callbacks: List[<type>] = ...")  [var-annotated]
+ src/prefect/_internal/concurrency/waiters.py:189: error: Need type annotation for "_done_callbacks" (hint: "_done_callbacks: list[<type>] = ...")  [var-annotated]
- src/prefect/plugins.py:43: error: Need type annotation for "results" (hint: "results: Dict[<type>, <type>] = ...")  [var-annotated]
+ src/prefect/plugins.py:43: error: Need type annotation for "results" (hint: "results: dict[<type>, <type>] = ...")  [var-annotated]
- src/prefect/utilities/pydantic.py:91: error: Need type annotation for "parent_class_fields" (hint: "parent_class_fields: Set[<type>] = ...")  [var-annotated]
+ src/prefect/utilities/pydantic.py:91: error: Need type annotation for "parent_class_fields" (hint: "parent_class_fields: set[<type>] = ...")  [var-annotated]
- src/prefect/utilities/callables.py:248: error: Need type annotation for "param_docstrings" (hint: "param_docstrings: Dict[<type>, <type>] = ...")  [var-annotated]
+ src/prefect/utilities/callables.py:248: error: Need type annotation for "param_docstrings" (hint: "param_docstrings: dict[<type>, <type>] = ...")  [var-annotated]
- src/prefect/utilities/callables.py:320: error: Need type annotation for "aliases" (hint: "aliases: Dict[<type>, <type>] = ...")  [var-annotated]
+ src/prefect/utilities/callables.py:320: error: Need type annotation for "aliases" (hint: "aliases: dict[<type>, <type>] = ...")  [var-annotated]
- src/prefect/utilities/asyncutils.py:41: error: Need type annotation for "EVENT_LOOP_GC_REFS" (hint: "EVENT_LOOP_GC_REFS: Dict[<type>, <type>] = ...")  [var-annotated]
+ src/prefect/utilities/asyncutils.py:41: error: Need type annotation for "EVENT_LOOP_GC_REFS" (hint: "EVENT_LOOP_GC_REFS: dict[<type>, <type>] = ...")  [var-annotated]
- src/prefect/server/utilities/schemas/bases.py:37: error: Need type annotation for "parent_class_fields" (hint: "parent_class_fields: Set[<type>] = ...")  [var-annotated]
+ src/prefect/server/utilities/schemas/bases.py:37: error: Need type annotation for "parent_class_fields" (hint: "parent_class_fields: set[<type>] = ...")  [var-annotated]
- src/prefect/client/orchestration.py:1700: error: Need type annotation for "exclude" (hint: "exclude: Set[<type>] = ...")  [var-annotated]
+ src/prefect/client/orchestration.py:1700: error: Need type annotation for "exclude" (hint: "exclude: set[<type>] = ...")  [var-annotated]
- src/prefect/blocks/core.py:104: error: Need type annotation for "non_block_definitions" (hint: "non_block_definitions: Dict[<type>, <type>] = ...")  [var-annotated]
+ src/prefect/blocks/core.py:104: error: Need type annotation for "non_block_definitions" (hint: "non_block_definitions: dict[<type>, <type>] = ...")  [var-annotated]
- src/prefect/runtime/deployment.py:38: error: Need type annotation for "CACHED_DEPLOYMENT" (hint: "CACHED_DEPLOYMENT: Dict[<type>, <type>] = ...")  [var-annotated]
+ src/prefect/runtime/deployment.py:38: error: Need type annotation for "CACHED_DEPLOYMENT" (hint: "CACHED_DEPLOYMENT: dict[<type>, <type>] = ...")  [var-annotated]
- src/prefect/deployments/base.py:530: error: Need type annotation for "decorated_functions" (hint: "decorated_functions: List[<type>] = ...")  [var-annotated]
+ src/prefect/deployments/base.py:530: error: Need type annotation for "decorated_functions" (hint: "decorated_functions: list[<type>] = ...")  [var-annotated]
- src/prefect/engine.py:221: error: Need type annotation for "API_HEALTHCHECKS" (hint: "API_HEALTHCHECKS: Dict[<type>, <type>] = ...")  [var-annotated]
+ src/prefect/engine.py:221: error: Need type annotation for "API_HEALTHCHECKS" (hint: "API_HEALTHCHECKS: dict[<type>, <type>] = ...")  [var-annotated]
- src/prefect/runner/runner.py:181: error: Need type annotation for "_submitting_flow_run_ids" (hint: "_submitting_flow_run_ids: Set[<type>] = ...")  [var-annotated]
+ src/prefect/runner/runner.py:181: error: Need type annotation for "_submitting_flow_run_ids" (hint: "_submitting_flow_run_ids: set[<type>] = ...")  [var-annotated]
- src/prefect/runner/runner.py:182: error: Need type annotation for "_cancelling_flow_run_ids" (hint: "_cancelling_flow_run_ids: Set[<type>] = ...")  [var-annotated]
+ src/prefect/runner/runner.py:182: error: Need type annotation for "_cancelling_flow_run_ids" (hint: "_cancelling_flow_run_ids: set[<type>] = ...")  [var-annotated]
- src/prefect/runner/runner.py:183: error: Need type annotation for "_scheduled_task_scopes" (hint: "_scheduled_task_scopes: Set[<type>] = ...")  [var-annotated]
+ src/prefect/runner/runner.py:183: error: Need type annotation for "_scheduled_task_scopes" (hint: "_scheduled_task_scopes: set[<type>] = ...")  [var-annotated]
- src/prefect/runner/runner.py:185: error: Need type annotation for "_flow_run_process_map" (hint: "_flow_run_process_map: Dict[<type>, <type>] = ...")  [var-annotated]
+ src/prefect/runner/runner.py:185: error: Need type annotation for "_flow_run_process_map" (hint: "_flow_run_process_map: dict[<type>, <type>] = ...")  [var-annotated]
- src/prefect/workers/base.py:407: error: Need type annotation for "_submitting_flow_run_ids" (hint: "_submitting_flow_run_ids: Set[<type>] = ...")  [var-annotated]
+ src/prefect/workers/base.py:407: error: Need type annotation for "_submitting_flow_run_ids" (hint: "_submitting_flow_run_ids: set[<type>] = ...")  [var-annotated]
- src/prefect/workers/base.py:408: error: Need type annotation for "_cancelling_flow_run_ids" (hint: "_cancelling_flow_run_ids: Set[<type>] = ...")  [var-annotated]
+ src/prefect/workers/base.py:408: error: Need type annotation for "_cancelling_flow_run_ids" (hint: "_cancelling_flow_run_ids: set[<type>] = ...")  [var-annotated]
- src/prefect/workers/base.py:409: error: Need type annotation for "_scheduled_task_scopes" (hint: "_scheduled_task_scopes: Set[<type>] = ...")  [var-annotated]
+ src/prefect/workers/base.py:409: error: Need type annotation for "_scheduled_task_scopes" (hint: "_scheduled_task_scopes: set[<type>] = ...")  [var-annotated]
- src/prefect/server/database/interface.py:18: error: Need type annotation for "_instances" (hint: "_instances: Dict[<type>, <type>] = ...")  [var-annotated]
+ src/prefect/server/database/interface.py:18: error: Need type annotation for "_instances" (hint: "_instances: dict[<type>, <type>] = ...")  [var-annotated]
- src/prefect/server/orchestration/core_policy.py:151: error: Need type annotation for "_applied_limits" (hint: "_applied_limits: List[<type>] = ...")  [var-annotated]
+ src/prefect/server/orchestration/core_policy.py:151: error: Need type annotation for "_applied_limits" (hint: "_applied_limits: list[<type>] = ...")  [var-annotated]
- src/prefect/server/models/block_schemas.py:427: error: Need type annotation for "definitions" (hint: "definitions: Dict[<type>, <type>] = ...")  [var-annotated]
+ src/prefect/server/models/block_schemas.py:427: error: Need type annotation for "definitions" (hint: "definitions: dict[<type>, <type>] = ...")  [var-annotated]
- src/prefect/agent.py:78: error: Need type annotation for "submitting_flow_run_ids" (hint: "submitting_flow_run_ids: Set[<type>] = ...")  [var-annotated]
+ src/prefect/agent.py:78: error: Need type annotation for "submitting_flow_run_ids" (hint: "submitting_flow_run_ids: set[<type>] = ...")  [var-annotated]
- src/prefect/agent.py:79: error: Need type annotation for "cancelling_flow_run_ids" (hint: "cancelling_flow_run_ids: Set[<type>] = ...")  [var-annotated]
+ src/prefect/agent.py:79: error: Need type annotation for "cancelling_flow_run_ids" (hint: "cancelling_flow_run_ids: set[<type>] = ...")  [var-annotated]
- src/prefect/agent.py:80: error: Need type annotation for "scheduled_task_scopes" (hint: "scheduled_task_scopes: Set[<type>] = ...")  [var-annotated]
+ src/prefect/agent.py:80: error: Need type annotation for "scheduled_task_scopes" (hint: "scheduled_task_scopes: set[<type>] = ...")  [var-annotated]
- src/prefect/infrastructure/provisioners/ecs.py:838: error: Need type annotation for "_next_steps" (hint: "_next_steps: List[<type>] = ...")  [var-annotated]
+ src/prefect/infrastructure/provisioners/ecs.py:838: error: Need type annotation for "_next_steps" (hint: "_next_steps: list[<type>] = ...")  [var-annotated]
- src/prefect/cli/deploy.py:591: error: Need type annotation for "step_outputs" (hint: "step_outputs: Dict[<type>, <type>] = ...")  [var-annotated]
+ src/prefect/cli/deploy.py:591: error: Need type annotation for "step_outputs" (hint: "step_outputs: dict[<type>, <type>] = ...")  [var-annotated]

apprise (https://github.com/caronc/apprise)
- apprise/conversion.py:102: error: Need type annotation for "BLOCK_END" (hint: "BLOCK_END: Dict[<type>, <type>] = ...")  [var-annotated]
+ apprise/conversion.py:102: error: Need type annotation for "BLOCK_END" (hint: "BLOCK_END: dict[<type>, <type>] = ...")  [var-annotated]
- apprise/utils.py:215: error: Need type annotation for "_instances" (hint: "_instances: Dict[<type>, <type>] = ...")  [var-annotated]
+ apprise/utils.py:215: error: Need type annotation for "_instances" (hint: "_instances: dict[<type>, <type>] = ...")  [var-annotated]
- test/helpers/rest.py:72: error: Need type annotation for "__tests" (hint: "__tests: List[<type>] = ...")  [var-annotated]
+ test/helpers/rest.py:72: error: Need type annotation for "__tests" (hint: "__tests: list[<type>] = ...")  [var-annotated]

arviz (https://github.com/arviz-devs/arviz)
- arviz/data/inference_data.py:408: error: Need type annotation for "group_kws" (hint: "group_kws: Dict[<type>, <type>] = ...")  [var-annotated]
+ arviz/data/inference_data.py:408: error: Need type annotation for "group_kws" (hint: "group_kws: dict[<type>, <type>] = ...")  [var-annotated]

operator (https://github.com/canonical/operator)
- ops/lib/__init__.py:206: error: Need type annotation for "libinfo" (hint: "libinfo: Dict[<type>, <type>] = ...")  [var-annotated]
+ ops/lib/__init__.py:206: error: Need type annotation for "libinfo" (hint: "libinfo: dict[<type>, <type>] = ...")  [var-annotated]
- ops/charm.py:1417: error: Need type annotation for "raw_actions" (hint: "raw_actions: Dict[<type>, <type>] = ...")  [var-annotated]
+ ops/charm.py:1417: error: Need type annotation for "raw_actions" (hint: "raw_actions: dict[<type>, <type>] = ...")  [var-annotated]

pandera (https://github.com/pandera-dev/pandera)
- pandera/api/dataframe/model.py:309: error: Need type annotation for "attrs" (hint: "attrs: Dict[<type>, <type>] = ...")  [var-annotated]
+ pandera/api/dataframe/model.py:309: error: Need type annotation for "attrs" (hint: "attrs: dict[<type>, <type>] = ...")  [var-annotated]

alerta (https://github.com/alerta/alerta)
- tests/plugins/test_reject.py:9: error: Need type annotation for "TEST_ORIGIN_BLACKLISTS" (hint: "TEST_ORIGIN_BLACKLISTS: List[<type>] = ...")  [var-annotated]
+ tests/plugins/test_reject.py:9: error: Need type annotation for "TEST_ORIGIN_BLACKLISTS" (hint: "TEST_ORIGIN_BLACKLISTS: list[<type>] = ...")  [var-annotated]

jax (https://github.com/google/jax)
- jaxlib/lapack.py:69: error: Need type annotation for "scalar_layout" (hint: "scalar_layout: List[<type>] = ...")  [var-annotated]
+ jaxlib/lapack.py:69: error: Need type annotation for "scalar_layout" (hint: "scalar_layout: list[<type>] = ...")  [var-annotated]
- jaxlib/lapack.py:109: error: Need type annotation for "scalar_layout" (hint: "scalar_layout: List[<type>] = ...")  [var-annotated]
+ jaxlib/lapack.py:109: error: Need type annotation for "scalar_layout" (hint: "scalar_layout: list[<type>] = ...")  [var-annotated]
- jaxlib/lapack.py:167: error: Need type annotation for "scalar_layout" (hint: "scalar_layout: List[<type>] = ...")  [var-annotated]
+ jaxlib/lapack.py:167: error: Need type annotation for "scalar_layout" (hint: "scalar_layout: list[<type>] = ...")  [var-annotated]
- jaxlib/lapack.py:234: error: Need type annotation for "scalar_layout" (hint: "scalar_layout: List[<type>] = ...")  [var-annotated]
+ jaxlib/lapack.py:234: error: Need type annotation for "scalar_layout" (hint: "scalar_layout: list[<type>] = ...")  [var-annotated]
- jaxlib/lapack.py:286: error: Need type annotation for "scalar_layout" (hint: "scalar_layout: List[<type>] = ...")  [var-annotated]
+ jaxlib/lapack.py:286: error: Need type annotation for "scalar_layout" (hint: "scalar_layout: list[<type>] = ...")  [var-annotated]
- jaxlib/lapack.py:366: error: Need type annotation for "scalar_layout" (hint: "scalar_layout: List[<type>] = ...")  [var-annotated]
+ jaxlib/lapack.py:366: error: Need type annotation for "scalar_layout" (hint: "scalar_layout: list[<type>] = ...")  [var-annotated]
- jaxlib/lapack.py:450: error: Need type annotation for "scalar_layout" (hint: "scalar_layout: List[<type>] = ...")  [var-annotated]
+ jaxlib/lapack.py:450: error: Need type annotation for "scalar_layout" (hint: "scalar_layout: list[<type>] = ...")  [var-annotated]
- jaxlib/lapack.py:538: error: Need type annotation for "scalar_layout" (hint: "scalar_layout: List[<type>] = ...")  [var-annotated]
+ jaxlib/lapack.py:538: error: Need type annotation for "scalar_layout" (hint: "scalar_layout: list[<type>] = ...")  [var-annotated]
- jaxlib/lapack.py:615: error: Need type annotation for "scalar_layout" (hint: "scalar_layout: List[<type>] = ...")  [var-annotated]
+ jaxlib/lapack.py:615: error: Need type annotation for "scalar_layout" (hint: "scalar_layout: list[<type>] = ...")  [var-annotated]
- jax/_src/source_info_util.py:190: error: Need type annotation for "code" (hint: "code: List[<type>] = ...")  [var-annotated]
+ jax/_src/source_info_util.py:190: error: Need type annotation for "code" (hint: "code: list[<type>] = ...")  [var-annotated]
- jax/_src/source_info_util.py:190: error: Need type annotation for "lasti" (hint: "lasti: List[<type>] = ...")  [var-annotated]
+ jax/_src/source_info_util.py:190: error: Need type annotation for "lasti" (hint: "lasti: list[<type>] = ...")  [var-annotated]

pyinstrument (https://github.com/joerick/pyinstrument)
- pyinstrument/renderers/pstatsrenderer.py:80: error: Need type annotation for "stats" (hint: "stats: Dict[<type>, <type>] = ...")  [var-annotated]
+ pyinstrument/renderers/pstatsrenderer.py:80: error: Need type annotation for "stats" (hint: "stats: dict[<type>, <type>] = ...")  [var-annotated]

pydantic (https://github.com/samuelcolvin/pydantic)
- pydantic/networks.py:559: error: Need type annotation for "field_schema" (hint: "field_schema: Dict[<type>, <type>] = ...")  [var-annotated]
+ pydantic/networks.py:559: error: Need type annotation for "field_schema" (hint: "field_schema: dict[<type>, <type>] = ...")  [var-annotated]
- pydantic/networks.py:599: error: Need type annotation for "field_schema" (hint: "field_schema: Dict[<type>, <type>] = ...")  [var-annotated]
+ pydantic/networks.py:599: error: Need type annotation for "field_schema" (hint: "field_schema: dict[<type>, <type>] = ...")  [var-annotated]
- pydantic/networks.py:641: error: Need type annotation for "field_schema" (hint: "field_schema: Dict[<type>, <type>] = ...")  [var-annotated]
+ pydantic/networks.py:641: error: Need type annotation for "field_schema" (hint: "field_schema: dict[<type>, <type>] = ...")  [var-annotated]
- pydantic/color.py:103: error: Need type annotation for "field_schema" (hint: "field_schema: Dict[<type>, <type>] = ...")  [var-annotated]
+ pydantic/color.py:103: error: Need type annotation for "field_schema" (hint: "field_schema: dict[<type>, <type>] = ...")  [var-annotated]

speedrun.com_global_scoreboard_webapp (https://github.com/Avasam/speedrun.com_global_scoreboard_webapp)
- backend/models/global_scoreboard_models.py:20: error: Need type annotation for "variables" (hint: "variables: Dict[<type>, <type>] = ...")  [var-annotated]
+ backend/models/global_scoreboard_models.py:20: error: Need type annotation for "variables" (hint: "variables: dict[<type>, <type>] = ...")  [var-annotated]
- backend/api/tournament_scheduler_api.py:246: error: Need type annotation for "participants" (hint: "participants: List[<type>] = ...")  [var-annotated]
+ backend/api/tournament_scheduler_api.py:246: error: Need type annotation for "participants" (hint: "participants: list[<type>] = ...")  [var-annotated]
- backend/api/tournament_scheduler_api.py:290: error: Need type annotation for "time_slots" (hint: "time_slots: List[<type>] = ...")  [var-annotated]
+ backend/api/tournament_scheduler_api.py:290: error: Need type annotation for "time_slots" (hint: "time_slots: list[<type>] = ...")  [var-annotated]

ibis (https://github.com/ibis-project/ibis)
- ibis/backends/impala/metadata.py:237: error: Need type annotation for "_storage_param_cleaners" (hint: "_storage_param_cleaners: Dict[<type>, <type>] = ...")  [var-annotated]
+ ibis/backends/impala/metadata.py:237: error: Need type annotation for "_storage_param_cleaners" (hint: "_storage_param_cleaners: dict[<type>, <type>] = ...")  [var-annotated]
- ibis/backends/__init__.py:1318: error: Need type annotation for "parts" (hint: "parts: List[<type>] = ...")  [var-annotated]
+ ibis/backends/__init__.py:1318: error: Need type annotation for "parts" (hint: "parts: list[<type>] = ...")  [var-annotated]
- ibis/expr/types/relations.py:2803: error: Need type annotation for "result_columns" (hint: "result_columns: List[<type>] = ...")  [var-annotated]
+ ibis/expr/types/relations.py:2803: error: Need type annotation for "result_columns" (hint: "result_columns: list[<type>] = ...")  [var-annotated]
- ibis/expr/types/relations.py:4353: error: Need type annotation for "sels" (hint: "sels: Dict[<type>, <type>] = ...")  [var-annotated]
+ ibis/expr/types/relations.py:4353: error: Need type annotation for "sels" (hint: "sels: dict[<type>, <type>] = ...")  [var-annotated]
- ibis/tests/util.py:63: error: Need type annotation for "locals_" (hint: "locals_: Dict[<type>, <type>] = ...")  [var-annotated]
+ ibis/tests/util.py:63: error: Need type annotation for "locals_" (hint: "locals_: dict[<type>, <type>] = ...")  [var-annotated]
- ibis/backends/impala/__init__.py:197: error: Need type annotation for "options" (hint: "options: Dict[<type>, <type>] = ...")  [var-annotated]
+ ibis/backends/impala/__init__.py:197: error: Need type annotation for "options" (hint: "options: dict[<type>, <type>] = ...")  [var-annotated]
- ibis/backends/duckdb/__init__.py:450: error: Need type annotation for "_record_batch_readers_consumed" (hint: "_record_batch_readers_consumed: Dict[<type>, <type>] = ...")  [var-annotated]
+ ibis/backends/duckdb/__init__.py:450: error: Need type annotation for "_record_batch_readers_consumed" (hint: "_record_batch_readers_consumed: dict[<type>, <type>] = ...")  [var-annotated]

discord.py (https://github.com/Rapptz/discord.py)
- discord/enums.py:112: error: Need type annotation for "value_mapping" (hint: "value_mapping: Dict[<type>, <type>] = ...")  [var-annotated]
+ discord/enums.py:112: error: Need type annotation for "value_mapping" (hint: "value_mapping: dict[<type>, <type>] = ...")  [var-annotated]
- discord/threads.py:270: error: Need type annotation for "tags" (hint: "tags: List[<type>] = ...")  [var-annotated]
+ discord/threads.py:270: error: Need type annotation for "tags" (hint: "tags: list[<type>] = ...")  [var-annotated]
- discord/shard.py:354: error: Need type annotation for "__shards" (hint: "__shards: Dict[<type>, <type>] = ...")  [var-annotated]
+ discord/shard.py:354: error: Need type annotation for "__shards" (hint: "__shards: dict[<type>, <type>] = ...")  [var-annotated]

... (truncated 10 lines) ...```

@JukkaL
Copy link
Collaborator Author

JukkaL commented Mar 15, 2024

The mypy_primer output changes are as expected.

@JukkaL JukkaL merged commit 1741c16 into master Mar 15, 2024
@JukkaL JukkaL deleted the lower-case-generics branch March 15, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants