π OpenHands: AI-Driven Development
Fix mypy error for pkg_resources import (#8537)
Robert Brennanf3f038bb60df
diff --git a/openhands/__init__.py b/openhands/__init__.pyindex eda56824e3..29c1c410b3 100644--- a/openhands/__init__.py+++ b/openhands/__init__.py@@ -22,7 +22,7 @@ def get_version():passtry:- from pkg_resources import DistributionNotFound, get_distribution+ from pkg_resources import DistributionNotFound, get_distribution # type: ignorereturn get_distribution(__package_name__).versionexcept (ImportError, DistributionNotFound):diff --git a/poetry.lock b/poetry.lockindex 8be138b833..12f821747b 100644--- a/poetry.lock+++ b/poetry.lock@@ -1,4 +1,4 @@-# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand.+# This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand.[[package]]name = "aiohappyeyeballs"@@ -3087,7 +3087,7 @@ google-auth = ">=2.14.1,<2.24.0 || >2.24.0,<2.25.0 || >2.25.0,<3.0.0dev"grpc-google-iam-v1 = ">=0.14.0,<1.0.0dev"proto-plus = [{version = ">=1.25.0,<2.0.0dev", markers = "python_version >= \"3.13\""},- {version = ">=1.22.3,<2.0.0dev"},+ {version = ">=1.22.3,<2.0.0dev", markers = "python_version < \"3.13\""},]protobuf = ">=3.20.2,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<6.0.0dev"@@ -8574,7 +8574,7 @@ description = "C version of reader, parser and emitter for ruamel.yaml derived foptional = falsepython-versions = ">=3.9"groups = ["main"]-markers = "platform_python_implementation == \"CPython\" and python_version == \"3.12\""+markers = "python_version < \"3.13\" and platform_python_implementation == \"CPython\""files = [{file = "ruamel.yaml.clib-0.2.12-cp310-cp310-macosx_13_0_arm64.whl", hash = "sha256:11f891336688faf5156a36293a9c362bdc7c88f03a8a027c2c1d8e0bcde998e5"},{file = "ruamel.yaml.clib-0.2.12-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:a606ef75a60ecf3d924613892cc603b154178ee25abb3055db5062da811fd969"},@@ -9966,7 +9966,7 @@ description = "A language and compiler for custom Deep Learning operations"optional = falsepython-versions = "*"groups = ["evaluation"]-markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.12\""+markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version < \"3.13\""files = [{file = "triton-3.0.0-1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e1efef76935b2febc365bfadf74bcb65a6f959a9872e5bddf44cc9e0adce1e1a"},{file = "triton-3.0.0-1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5ce8520437c602fb633f1324cc3871c47bee3b67acf9756c1a66309b60e3216c"},@@ -10076,6 +10076,18 @@ files = [{file = "types_s3transfer-0.11.4.tar.gz", hash = "sha256:05fde593c84270f19fd053f0b1e08f5a057d7c5f036b9884e68fb8cd3041ac30"},]+[[package]]+name = "types-setuptools"+version = "80.7.0.20250516"+description = "Typing stubs for setuptools"+optional = false+python-versions = ">=3.9"+groups = ["dev"]+files = [+ {file = "types_setuptools-80.7.0.20250516-py3-none-any.whl", hash = "sha256:c1da6c11698139c8307c6df5987592df940e956912c204e42d844ba821dd2741"},+ {file = "types_setuptools-80.7.0.20250516.tar.gz", hash = "sha256:57274b58e05434de42088a86074c9e630e5786f759cf9cc1e3015e886297ca21"},+]+[[package]]name = "types-toml"version = "0.10.8.20240310"@@ -11253,4 +11265,4 @@ cffi = ["cffi (>=1.11)"][metadata]lock-version = "2.1"python-versions = "^3.12,<3.14"-content-hash = "27d37f3628300dd919b6ff1bff9f558dc1a46052d68fc831a72642402e2c58fe"+content-hash = "998d731b9d5cfa2239ef2019e95b681c44c70294f467cf9fdadbf2d551422ebe"diff --git a/pyproject.toml b/pyproject.tomlindex aac55850cd..fbf1da90f2 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -91,6 +91,7 @@ ruff = "0.11.10"mypy = "1.15.0"pre-commit = "4.2.0"build = "*"+types-setuptools = "*"[tool.poetry.group.test.dependencies]pytest = "*"