Skip to content

Commit e04761e

Browse files
committed
chore(release): bump version 0.66.0 → 0.66.1
1 parent 6589b71 commit e04761e

File tree

22 files changed

+73
-58
lines changed

22 files changed

+73
-58
lines changed

CHANGELOG.md

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

33
All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
44

5+
## [0.66.1](https://github.com/d-biehl/robotcode/compare/v0.66.0..v0.66.1) - 2023-11-24
6+
7+
### Bug Fixes
8+
9+
- **langserver:** Show a hint instead an error if there are variables used in a test case name ([6589b71](https://github.com/d-biehl/robotcode/commit/6589b712c12efc570ab5d395752b3e0acce8fac8))
10+
11+
512
## [0.66.0](https://github.com/d-biehl/robotcode/compare/v0.65.1..v0.66.0) - 2023-11-23
613

714
### Bug Fixes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "RobotFramework support for Visual Studio Code",
55
"icon": "images/icon.png",
66
"publisher": "d-biehl",
7-
"version": "0.66.0",
7+
"version": "0.66.1",
88
"author": {
99
"name": "Daniel Biehl",
1010
"url": "https://github.com/d-biehl/"

packages/analyze/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ classifiers = [
2727
]
2828
dependencies = [
2929
"robotframework>=4.1.0",
30-
"robotcode-plugin==0.66.0",
31-
"robotcode-robot==0.66.0",
32-
"robotcode==0.66.0",
30+
"robotcode-plugin==0.66.1",
31+
"robotcode-robot==0.66.1",
32+
"robotcode==0.66.1",
3333
]
3434
dynamic = ["version"]
3535

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.66.0"
1+
__version__ = "0.66.1"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.66.0"
1+
__version__ = "0.66.1"

packages/core/src/robotcode/core/event.py

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,21 @@
1616
cast,
1717
)
1818

19-
__all__ = ["EventIterator", "Event"]
19+
from typing_extensions import ParamSpec
20+
21+
__all__ = ["event_iterator", "event"]
2022

2123
_TResult = TypeVar("_TResult")
22-
_TCallable = TypeVar("_TCallable", bound=Callable[..., Any])
24+
_TParams = ParamSpec("_TParams")
2325

2426

25-
class EventResultIteratorBase(Generic[_TCallable, _TResult]):
27+
class EventResultIteratorBase(Generic[_TParams, _TResult]):
2628
def __init__(self) -> None:
2729
self._lock = threading.RLock()
2830

2931
self._listeners: MutableSet[weakref.ref[Any]] = set()
3032

31-
def add(self, callback: _TCallable) -> None:
33+
def add(self, callback: Callable[_TParams, _TResult]) -> None:
3234
def remove_listener(ref: Any) -> None:
3335
with self._lock:
3436
self._listeners.remove(ref)
@@ -39,7 +41,7 @@ def remove_listener(ref: Any) -> None:
3941
else:
4042
self._listeners.add(weakref.ref(callback, remove_listener))
4143

42-
def remove(self, callback: _TCallable) -> None:
44+
def remove(self, callback: Callable[_TParams, _TResult]) -> None:
4345
with self._lock:
4446
try:
4547
if inspect.ismethod(callback):
@@ -61,33 +63,37 @@ def __len__(self) -> int:
6163
def __bool__(self) -> bool:
6264
return len(self._listeners) > 0
6365

64-
def __iter__(self) -> Iterator[_TCallable]:
66+
def __iter__(self) -> Iterator[Callable[_TParams, _TResult]]:
6567
for r in self._listeners:
6668
c = r()
6769
if c is not None:
6870
yield c
6971

70-
def _notify(self, *args: Any, **kwargs: Any) -> Iterator[_TResult]:
72+
def _notify(self, *__args: _TParams.args, **__kwargs: _TParams.kwargs) -> Iterator[_TResult]:
7173
for method in set(self):
72-
yield method(*args, **kwargs)
74+
yield method(*__args, **__kwargs)
7375

7476

75-
class EventIterator(EventResultIteratorBase[_TCallable, _TResult]):
76-
def __call__(self, *args: Any, **kwargs: Any) -> Iterator[_TResult]:
77-
return self._notify(*args, **kwargs)
77+
class EventIterator(EventResultIteratorBase[_TParams, _TResult]):
78+
def __call__(self, *__args: _TParams.args, **__kwargs: _TParams.kwargs) -> Iterator[_TResult]:
79+
return self._notify(*__args, **__kwargs)
7880

7981

80-
class Event(EventResultIteratorBase[_TCallable, _TResult]):
81-
def __call__(self, *args: Any, **kwargs: Any) -> List[_TResult]:
82-
return list(self._notify(*args, **kwargs))
82+
class Event(EventResultIteratorBase[_TParams, _TResult]):
83+
def __call__(self, *__args: _TParams.args, **__kwargs: _TParams.kwargs) -> List[_TResult]:
84+
return list(self._notify(*__args, **__kwargs))
8385

8486

8587
_TEvent = TypeVar("_TEvent")
8688

8789

88-
class EventDescriptorBase(Generic[_TCallable, _TResult, _TEvent]):
90+
class EventDescriptorBase(Generic[_TParams, _TResult, _TEvent]):
8991
def __init__(
90-
self, _func: _TCallable, factory: Callable[..., _TEvent], *factory_args: Any, **factory_kwargs: Any
92+
self,
93+
_func: Callable[_TParams, _TResult],
94+
factory: Callable[..., _TEvent],
95+
*factory_args: Any,
96+
**factory_kwargs: Any,
9197
) -> None:
9298
self._func = _func
9399
self.__factory = factory
@@ -111,11 +117,11 @@ def __get__(self, obj: Any, objtype: Type[Any]) -> _TEvent:
111117
return cast("_TEvent", getattr(obj, name))
112118

113119

114-
class event_iterator(EventDescriptorBase[_TCallable, Any, EventIterator[_TCallable, Any]]): # noqa: N801
115-
def __init__(self, _func: _TCallable) -> None:
116-
super().__init__(_func, EventIterator[_TCallable, Any])
120+
class event_iterator(EventDescriptorBase[_TParams, _TResult, EventIterator[_TParams, _TResult]]): # noqa: N801
121+
def __init__(self, _func: Callable[_TParams, _TResult]) -> None:
122+
super().__init__(_func, EventIterator[_TParams, _TResult])
117123

118124

119-
class event(EventDescriptorBase[_TCallable, Any, Event[_TCallable, Any]]): # noqa: N801
120-
def __init__(self, _func: _TCallable) -> None:
121-
super().__init__(_func, Event[_TCallable, Any])
125+
class event(EventDescriptorBase[_TParams, _TResult, Event[_TParams, _TResult]]): # noqa: N801
126+
def __init__(self, _func: Callable[_TParams, _TResult]) -> None:
127+
super().__init__(_func, Event[_TParams, _TResult])

packages/debugger/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ classifiers = [
2828
dynamic = ["version"]
2929
dependencies = [
3030
"robotframework>=4.1.0",
31-
"robotcode-jsonrpc2==0.66.0",
32-
"robotcode-runner==0.66.0",
31+
"robotcode-jsonrpc2==0.66.1",
32+
"robotcode-runner==0.66.1",
3333
]
3434

3535
[project.optional-dependencies]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.66.0"
1+
__version__ = "0.66.1"

packages/debugger/src/robotcode/debugger/debugger.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@
2222
List,
2323
Literal,
2424
Mapping,
25+
MutableMapping,
2526
NamedTuple,
2627
Optional,
2728
Sequence,
2829
Set,
2930
Tuple,
3031
Union,
32+
cast,
3133
)
3234

3335
from robot.api.parsing import get_model
@@ -482,7 +484,7 @@ def step_out(self, thread_id: int, granularity: Optional[SteppingGranularity] =
482484
self.condition.notify_all()
483485

484486
@event
485-
def send_event(sender, event: Event) -> None: # NOSONAR
487+
def send_event(sender: Any, event: Event) -> None: # NOSONAR
486488
...
487489

488490
def set_breakpoints(
@@ -1295,7 +1297,7 @@ def get_variables(
12951297
count: Optional[int] = None,
12961298
format: Optional[ValueFormat] = None,
12971299
) -> List[Variable]:
1298-
result = NormalizedDict(ignore="_")
1300+
result: MutableMapping[str, Any] = NormalizedDict(ignore="_")
12991301

13001302
if filter is None:
13011303
entry = next(
@@ -1514,7 +1516,7 @@ def get_test_body_from_string(command: str) -> TestCase:
15141516

15151517
model = get_model(suite_str)
15161518
suite: TestSuite = TestSuite.from_model(model)
1517-
return suite.tests[0]
1519+
return cast(TestCase, suite.tests[0])
15181520

15191521
def run_kw() -> Any:
15201522
test = get_test_body_from_string(expression)

packages/debugger/src/robotcode/debugger/listeners.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def enqueue(item: Union[running.TestSuite, running.TestCase]) -> Iterator[str]:
277277
if self._event_sended:
278278
return
279279

280-
items = list(reversed(list(enqueue(cast(running.TestSuite, data)))))
280+
items = list(reversed(list(enqueue(cast(running.model.TestSuite, data)))))
281281

282282
Debugger.instance().send_event(
283283
self,

0 commit comments

Comments
 (0)