Skip to content

Commit c613a2d

Browse files
authored
Fixed typing of singleton meta (#13)
1 parent 294027b commit c613a2d

6 files changed

Lines changed: 19 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to `uipath_llm_client` (core package) will be documented in this file.
44

5+
## [1.0.8] - 2026-02-04
6+
7+
### Bug Fix
8+
- Fixed a typing issue of Singleton
9+
510
## [1.0.7] - 2026-02-04
611

712
### Fix

packages/uipath_langchain_client/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to `uipath_langchain_client` will be documented in this file.
44

5+
## [1.0.9] - 2026-02-04
6+
7+
### Fix
8+
- Fixed typing in core package, updated dependency
9+
510
## [1.0.8] - 2026-02-04
611

712
### Fix

packages/uipath_langchain_client/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ readme = "README.md"
66
requires-python = ">=3.11"
77
dependencies = [
88
"langchain>=1.2.7",
9-
"uipath-llm-client>=1.0.7",
9+
"uipath-llm-client>=1.0.8",
1010
]
1111

1212
[project.optional-dependencies]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
__title__ = "UiPath LangChain Client"
22
__description__ = "A Python client for interacting with UiPath's LLM services via LangChain."
3-
__version__ = "1.0.8"
3+
__version__ = "1.0.9"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
__titile__ = "UiPath LLM Client"
22
__description__ = "A Python client for interacting with UiPath's LLM services."
3-
__version__ = "1.0.7"
3+
__version__ = "1.0.8"
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
from typing import Any
22

33

4-
class SingletonMeta[T](type):
4+
class SingletonMeta(type):
55
"""Metaclass for creating singleton classes. Used to keep global configs shared between instances."""
66

7-
_instances: dict[Any, Any] = {}
7+
_instances: dict[type, Any] = {}
88

9-
def __call__(cls: type[T], *args: Any, **kwargs: Any) -> T:
10-
instances = SingletonMeta._instances
11-
if cls not in instances:
9+
def __call__(cls, *args: Any, **kwargs: Any) -> Any:
10+
if cls not in SingletonMeta._instances:
1211
instance = super().__call__(*args, **kwargs)
13-
instances[cls] = instance
14-
return instances[cls]
12+
SingletonMeta._instances[cls] = instance
13+
return SingletonMeta._instances[cls]

0 commit comments

Comments
 (0)