From e74683a2ab092d92ff19004043d57388e0b4823e Mon Sep 17 00:00:00 2001 From: kristapratico Date: Thu, 18 Sep 2025 19:05:10 +0000 Subject: [PATCH 1/3] bump pyright version for http-client-python --- packages/http-client-python/eng/scripts/ci/dev_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 7600d6f7e892dc6e9fec0c699ae16d367599c766 Mon Sep 17 00:00:00 2001 From: kristapratico Date: Thu, 18 Sep 2025 19:05:43 +0000 Subject: [PATCH 2/3] add changeset --- .chronus/changes/bump-pyright-2025-8-18-19-5-32.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .chronus/changes/bump-pyright-2025-8-18-19-5-32.md 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 From 8c53ecbd8b88655a110002776d0bc149e607d621 Mon Sep 17 00:00:00 2001 From: kristapratico Date: Thu, 18 Sep 2025 19:59:30 +0000 Subject: [PATCH 3/3] try fix typing error --- .../generator/pygen/codegen/templates/serialization.py.jinja2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)