diff --git a/.chronus/changes/bump-pyright-2025-8-18-19-5-32.md b/.chronus/changes/bump-pyright-2025-8-18-19-5-32.md new file mode 100644 index 00000000000..0f374dce470 --- /dev/null +++ b/.chronus/changes/bump-pyright-2025-8-18-19-5-32.md @@ -0,0 +1,7 @@ +--- +changeKind: dependencies +packages: + - "@typespec/http-client-python" +--- + +bump pyright version to 1.1.405 \ No newline at end of file diff --git a/packages/http-client-python/eng/scripts/ci/dev_requirements.txt b/packages/http-client-python/eng/scripts/ci/dev_requirements.txt index 106a07a8450..1b7a304f9ae 100644 --- a/packages/http-client-python/eng/scripts/ci/dev_requirements.txt +++ b/packages/http-client-python/eng/scripts/ci/dev_requirements.txt @@ -1,4 +1,4 @@ -pyright==1.1.391 +pyright==1.1.405 pylint==3.2.7 tox==4.16.0 mypy==1.18.1 diff --git a/packages/http-client-python/generator/pygen/codegen/templates/serialization.py.jinja2 b/packages/http-client-python/generator/pygen/codegen/templates/serialization.py.jinja2 index 6384cd230d9..17699dd39b3 100644 --- a/packages/http-client-python/generator/pygen/codegen/templates/serialization.py.jinja2 +++ b/packages/http-client-python/generator/pygen/codegen/templates/serialization.py.jinja2 @@ -783,7 +783,7 @@ class Serializer: # pylint: disable=too-many-public-methods # If dependencies is empty, try with current data class # It has to be a subclass of Enum anyway - enum_type = self.dependencies.get(data_type, data.__class__) + enum_type = self.dependencies.get(data_type, cast(type, data.__class__)) if issubclass(enum_type, Enum): return Serializer.serialize_enum(data, enum_obj=enum_type)