Skip to content

Commit

Permalink
Update version and format code
Browse files Browse the repository at this point in the history
  • Loading branch information
dhzdhd committed Aug 30, 2024
1 parent aa46424 commit 3081d60
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to this project will be documented in this file.

## [0.6.0] - 2024-08-30

### Added

- `show_locals` parameter to print local variable values after the execution of the function.

## [0.5.1] - 2024-07-07

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pysvt"
version = "0.5.1"
version = "0.6.0"
description = "A simple test case runner in Python that uses TOML configurations and decorator syntax."
authors = ["dhzdhd <[email protected]>"]
readme = "README.md"
Expand Down
8 changes: 5 additions & 3 deletions pysvt/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
from rich.console import Console

from pysvt.utils.ctx import Timer
from pysvt.utils.validation import get_result_locals
from pysvt.utils.models import Result, _ClsModel, _FuncModel
from pysvt.utils.printer import Printer
from pysvt.utils.validation import get_result_locals

console = Console()

Expand Down Expand Up @@ -347,6 +347,8 @@ def _validate(self, data: _FuncModel, func: Callable[..., Any]) -> Result:


class inspect_locals:
def __init__(self) -> None: ...
def __init__(self) -> None:
...

def __call__(self, obj: object) -> Any: ...
def __call__(self, obj: object) -> Any:
...
2 changes: 1 addition & 1 deletion pysvt/utils/printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def post_validation(
out_str += f"""\n\n{Printer.bold("Stdout")} -\n{res.stdout.strip()}"""

if res.local_vars is not None:
out_str += f"\n\n{Printer.bold("Local variables")} -"
out_str += f"""\n\n{Printer.bold("Local variables")} -"""

for k, v in res.local_vars.items():
out_str += f"\n {k} - {v}"
Expand Down
2 changes: 1 addition & 1 deletion pysvt/utils/validation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys
import types
from typing import Callable, Any
from typing import Any, Callable


def get_result_locals(
Expand Down

0 comments on commit 3081d60

Please sign in to comment.