Skip to content

Upgrade to mypy 2.x #8026

@dsotirho-ucsc

Description

@dsotirho-ucsc

Upgrade is currently not trivial because of the following errors:

$ mypy --version
mypy 2.1.0 (compiled: yes)

$mypy
src/azul/__init__.py:849: error: Name "_it_catalog_re" already defined on line 848  [no-redef]
src/azul/__init__.py:850: error: Name "_catalog_re" already defined on line 846  [no-redef]
src/azul/__init__.py:883: error: "str" has no attribute "match"  [attr-defined]
src/azul/__init__.py:895: error: "str" has no attribute "match"  [attr-defined]
src/azul/__init__.py:917: error: "str" has no attribute "fullmatch"  [attr-defined]
src/azul/http.py:171: error: Name "client" already defined on line 170  [no-redef]
src/azul/service/manifest_service.py:1585: error: Name "source" already defined on line 1584  [no-redef]
src/azul/service/manifest_service.py:1600: error: "Mapping[str, AnyJSON]" has no attribute "spec"  [attr-defined]
src/azul/infra/bigquery_reservation.py:231: error: Name "resources" already defined on line 230  [no-redef]
src/azul/indexer/index_service.py:893: error: Name "documents" already defined on line 891  [no-redef]
src/azul/indexer/index_service.py:938: error: "Iterable[Document[Any]]" has no attribute "values"  [attr-defined]
src/azul/indexer/index_service.py:947: error: Value of type "Iterable[Document[Any]]" is not indexable  [index]
src/azul/terra.py:667: error: Incompatible return value type (got "tuple[str, dict[str, str]]", expected "tuple[str, MutableJSON] | tuple[None, None]")  [return-value]
src/azul/terra.py:670: error: Incompatible return value type (got "tuple[str, dict[str, str]]", expected "tuple[str, MutableJSON] | tuple[None, None]")  [return-value]
test/test_tagging.py:87: error: Name "expected" already defined on line 35  [no-redef]
Found 15 errors in 7 files (checked 114 source files)

Metadata

Metadata

Assignees

Labels

infra[subject] Project infrastructure like CI/CD, build and deployment scriptsno demo[process] Not to be demonstrated at the end of the sprintspike:1[process] Spike estimate of one point

Type

No fields configured for Debt.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions