Skip to content

Commit

Permalink
chore(release): bump version 0.66.0 → 0.66.1
Browse files Browse the repository at this point in the history
  • Loading branch information
d-biehl committed Nov 24, 2023
1 parent 6589b71 commit e04761e
Show file tree
Hide file tree
Showing 22 changed files with 73 additions and 58 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

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

## [0.66.1](https://github.com/d-biehl/robotcode/compare/v0.66.0..v0.66.1) - 2023-11-24

### Bug Fixes

- **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))


## [0.66.0](https://github.com/d-biehl/robotcode/compare/v0.65.1..v0.66.0) - 2023-11-23

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "RobotFramework support for Visual Studio Code",
"icon": "images/icon.png",
"publisher": "d-biehl",
"version": "0.66.0",
"version": "0.66.1",
"author": {
"name": "Daniel Biehl",
"url": "https://github.com/d-biehl/"
Expand Down
6 changes: 3 additions & 3 deletions packages/analyze/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ classifiers = [
]
dependencies = [
"robotframework>=4.1.0",
"robotcode-plugin==0.66.0",
"robotcode-robot==0.66.0",
"robotcode==0.66.0",
"robotcode-plugin==0.66.1",
"robotcode-robot==0.66.1",
"robotcode==0.66.1",
]
dynamic = ["version"]

Expand Down
2 changes: 1 addition & 1 deletion packages/analyze/src/robotcode/analyze/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.66.0"
__version__ = "0.66.1"
2 changes: 1 addition & 1 deletion packages/core/src/robotcode/core/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.66.0"
__version__ = "0.66.1"
50 changes: 28 additions & 22 deletions packages/core/src/robotcode/core/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,21 @@
cast,
)

__all__ = ["EventIterator", "Event"]
from typing_extensions import ParamSpec

__all__ = ["event_iterator", "event"]

_TResult = TypeVar("_TResult")
_TCallable = TypeVar("_TCallable", bound=Callable[..., Any])
_TParams = ParamSpec("_TParams")


class EventResultIteratorBase(Generic[_TCallable, _TResult]):
class EventResultIteratorBase(Generic[_TParams, _TResult]):
def __init__(self) -> None:
self._lock = threading.RLock()

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

def add(self, callback: _TCallable) -> None:
def add(self, callback: Callable[_TParams, _TResult]) -> None:
def remove_listener(ref: Any) -> None:
with self._lock:
self._listeners.remove(ref)
Expand All @@ -39,7 +41,7 @@ def remove_listener(ref: Any) -> None:
else:
self._listeners.add(weakref.ref(callback, remove_listener))

def remove(self, callback: _TCallable) -> None:
def remove(self, callback: Callable[_TParams, _TResult]) -> None:
with self._lock:
try:
if inspect.ismethod(callback):
Expand All @@ -61,33 +63,37 @@ def __len__(self) -> int:
def __bool__(self) -> bool:
return len(self._listeners) > 0

def __iter__(self) -> Iterator[_TCallable]:
def __iter__(self) -> Iterator[Callable[_TParams, _TResult]]:
for r in self._listeners:
c = r()
if c is not None:
yield c

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


class EventIterator(EventResultIteratorBase[_TCallable, _TResult]):
def __call__(self, *args: Any, **kwargs: Any) -> Iterator[_TResult]:
return self._notify(*args, **kwargs)
class EventIterator(EventResultIteratorBase[_TParams, _TResult]):
def __call__(self, *__args: _TParams.args, **__kwargs: _TParams.kwargs) -> Iterator[_TResult]:
return self._notify(*__args, **__kwargs)


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


_TEvent = TypeVar("_TEvent")


class EventDescriptorBase(Generic[_TCallable, _TResult, _TEvent]):
class EventDescriptorBase(Generic[_TParams, _TResult, _TEvent]):
def __init__(
self, _func: _TCallable, factory: Callable[..., _TEvent], *factory_args: Any, **factory_kwargs: Any
self,
_func: Callable[_TParams, _TResult],
factory: Callable[..., _TEvent],
*factory_args: Any,
**factory_kwargs: Any,
) -> None:
self._func = _func
self.__factory = factory
Expand All @@ -111,11 +117,11 @@ def __get__(self, obj: Any, objtype: Type[Any]) -> _TEvent:
return cast("_TEvent", getattr(obj, name))


class event_iterator(EventDescriptorBase[_TCallable, Any, EventIterator[_TCallable, Any]]): # noqa: N801
def __init__(self, _func: _TCallable) -> None:
super().__init__(_func, EventIterator[_TCallable, Any])
class event_iterator(EventDescriptorBase[_TParams, _TResult, EventIterator[_TParams, _TResult]]): # noqa: N801
def __init__(self, _func: Callable[_TParams, _TResult]) -> None:
super().__init__(_func, EventIterator[_TParams, _TResult])


class event(EventDescriptorBase[_TCallable, Any, Event[_TCallable, Any]]): # noqa: N801
def __init__(self, _func: _TCallable) -> None:
super().__init__(_func, Event[_TCallable, Any])
class event(EventDescriptorBase[_TParams, _TResult, Event[_TParams, _TResult]]): # noqa: N801
def __init__(self, _func: Callable[_TParams, _TResult]) -> None:
super().__init__(_func, Event[_TParams, _TResult])
4 changes: 2 additions & 2 deletions packages/debugger/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ classifiers = [
dynamic = ["version"]
dependencies = [
"robotframework>=4.1.0",
"robotcode-jsonrpc2==0.66.0",
"robotcode-runner==0.66.0",
"robotcode-jsonrpc2==0.66.1",
"robotcode-runner==0.66.1",
]

[project.optional-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion packages/debugger/src/robotcode/debugger/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.66.0"
__version__ = "0.66.1"
8 changes: 5 additions & 3 deletions packages/debugger/src/robotcode/debugger/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
List,
Literal,
Mapping,
MutableMapping,
NamedTuple,
Optional,
Sequence,
Set,
Tuple,
Union,
cast,
)

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

@event
def send_event(sender, event: Event) -> None: # NOSONAR
def send_event(sender: Any, event: Event) -> None: # NOSONAR
...

def set_breakpoints(
Expand Down Expand Up @@ -1295,7 +1297,7 @@ def get_variables(
count: Optional[int] = None,
format: Optional[ValueFormat] = None,
) -> List[Variable]:
result = NormalizedDict(ignore="_")
result: MutableMapping[str, Any] = NormalizedDict(ignore="_")

if filter is None:
entry = next(
Expand Down Expand Up @@ -1514,7 +1516,7 @@ def get_test_body_from_string(command: str) -> TestCase:

model = get_model(suite_str)
suite: TestSuite = TestSuite.from_model(model)
return suite.tests[0]
return cast(TestCase, suite.tests[0])

def run_kw() -> Any:
test = get_test_body_from_string(expression)
Expand Down
2 changes: 1 addition & 1 deletion packages/debugger/src/robotcode/debugger/listeners.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def enqueue(item: Union[running.TestSuite, running.TestCase]) -> Iterator[str]:
if self._event_sended:
return

items = list(reversed(list(enqueue(cast(running.TestSuite, data)))))
items = list(reversed(list(enqueue(cast(running.model.TestSuite, data)))))

Debugger.instance().send_event(
self,
Expand Down
2 changes: 1 addition & 1 deletion packages/jsonrpc2/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ classifiers = [
"Framework :: Robot Framework",
"Framework :: Robot Framework :: Tool",
]
dependencies = ["robotcode-core==0.66.0"]
dependencies = ["robotcode-core==0.66.1"]
dynamic = ["version"]

[project.urls]
Expand Down
2 changes: 1 addition & 1 deletion packages/jsonrpc2/src/robotcode/jsonrpc2/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.66.0"
__version__ = "0.66.1"
4 changes: 2 additions & 2 deletions packages/language_server/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ classifiers = [
]
dependencies = [
"robotframework>=4.1.0",
"robotcode-jsonrpc2==0.66.0",
"robotcode==0.66.0",
"robotcode-jsonrpc2==0.66.1",
"robotcode==0.66.1",
]
dynamic = ["version"]

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.66.0"
__version__ = "0.66.1"
2 changes: 1 addition & 1 deletion packages/modifiers/src/robotcode/modifiers/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.66.0"
__version__ = "0.66.1"
2 changes: 1 addition & 1 deletion packages/plugin/src/robotcode/plugin/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.66.0"
__version__ = "0.66.1"
2 changes: 1 addition & 1 deletion packages/robot/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies = [
"robotframework>=4.1.0",
"tomli>=1.1.0; python_version < '3.11'",
"platformdirs<3.12.0,>=3.2.0",
"robotcode-core==0.66.0",
"robotcode-core==0.66.1",
]
dynamic = ["version"]

Expand Down
2 changes: 1 addition & 1 deletion packages/robot/src/robotcode/robot/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.66.0"
__version__ = "0.66.1"
6 changes: 3 additions & 3 deletions packages/runner/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ classifiers = [
dynamic = ["version"]
dependencies = [
"robotframework>=4.1.0",
"robotcode-robot==0.66.0",
"robotcode-modifiers==0.66.0",
"robotcode==0.66.0",
"robotcode-robot==0.66.1",
"robotcode-modifiers==0.66.1",
"robotcode==0.66.1",
]

[project.entry-points.robotcode]
Expand Down
2 changes: 1 addition & 1 deletion packages/runner/src/robotcode/runner/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.66.0"
__version__ = "0.66.1"
18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ classifiers = [
"Framework :: Robot Framework :: Tool",
]
requires-python = ">=3.8"
dependencies = ["robotcode-core==0.66.0"]
dependencies = ["robotcode-core==0.66.1"]
dynamic = ["version"]


Expand All @@ -66,20 +66,20 @@ robotcode = "robotcode.cli.__main__:main"


[project.optional-dependencies]
debugger = ["robotcode-debugger==0.66.0"]
languageserver = ["robotcode-language-server==0.66.0"]
runner = ["robotcode-runner==0.66.0"]
analyze = ["robotcode-analyze==0.66.0"]
debugger = ["robotcode-debugger==0.66.1"]
languageserver = ["robotcode-language-server==0.66.1"]
runner = ["robotcode-runner==0.66.1"]
analyze = ["robotcode-analyze==0.66.1"]
yaml = ["PyYAML>=5.4"]
lint = ["robotframework-robocop>=2.0.0"]
tidy = ["robotframework-tidy>=2.0.0"]
rest = ["docutils"]
colored = ["rich"]
all = [
"robotcode-debugger==0.66.0",
"robotcode-language-server==0.66.0",
"robotcode-runner==0.66.0",
"robotcode-analyze==0.66.0",
"robotcode-debugger==0.66.1",
"robotcode-language-server==0.66.1",
"robotcode-runner==0.66.1",
"robotcode-analyze==0.66.1",
"PyYAML>=5.4",
"robotframework-robocop>=2.0.0",
"robotframework-tidy>=2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/robotcode/cli/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.66.0"
__version__ = "0.66.1"

0 comments on commit e04761e

Please sign in to comment.