From eebcebe4fc070e59a3af91edcddbfd26d335d168 Mon Sep 17 00:00:00 2001 From: yanovs <42386943+yanovs@users.noreply.github.com> Date: Wed, 7 Dec 2022 17:02:59 -0500 Subject: [PATCH] Fix CI (#2) * Fix style * Fix py3.7 --- leda/gen/base.py | 7 ++++--- .../static_ipywidgets/tests/test_interact.py | 7 +++++-- requirements-bundle0.txt | 1 + requirements-bundle1.txt | 1 + requirements-bundle2.txt | 1 + setup.cfg | 1 + 6 files changed, 13 insertions(+), 5 deletions(-) diff --git a/leda/gen/base.py b/leda/gen/base.py index 6b1242f..eee62f9 100644 --- a/leda/gen/base.py +++ b/leda/gen/base.py @@ -2,11 +2,12 @@ import dataclasses import datetime -import functools import logging import pathlib from typing import IO, Any, List, Mapping, MutableMapping, Optional, Union +import cached_property + logger = logging.getLogger(__name__) logger.addHandler(logging.NullHandler()) @@ -22,7 +23,7 @@ class Report: cell_timeout: Optional[datetime.timedelta] = None - @functools.cached_property + @cached_property.cached_property def full_name(self) -> str: if self.tag: parts = [self.name, self.tag] @@ -37,7 +38,7 @@ def full_name(self) -> str: def handle(self) -> Union[str, IO]: raise NotImplementedError - @functools.cached_property + @cached_property.cached_property def inject_code(self) -> Optional[str]: if not self.params and not self.additional_inject_code: return None diff --git a/leda/vendor/static_ipywidgets/static_ipywidgets/tests/test_interact.py b/leda/vendor/static_ipywidgets/static_ipywidgets/tests/test_interact.py index 96d875b..bc7e636 100644 --- a/leda/vendor/static_ipywidgets/static_ipywidgets/tests/test_interact.py +++ b/leda/vendor/static_ipywidgets/static_ipywidgets/tests/test_interact.py @@ -22,11 +22,14 @@ def test_simple(): func, x=widgets.DropDownWidget([1, 2]) ) html = static_interact.html() - assert """ + assert ( + """
2
4 -
""" in html + """ + in html + ) diff --git a/requirements-bundle0.txt b/requirements-bundle0.txt index 853e81d..182bd5f 100644 --- a/requirements-bundle0.txt +++ b/requirements-bundle0.txt @@ -1,4 +1,5 @@ # python 3.8.10 +cached-property == 1.5.2 ipython == 7.16.1 ipywidgets == 7.5.1 markdown2 == 2.3.9 diff --git a/requirements-bundle1.txt b/requirements-bundle1.txt index 390485e..e9a4a06 100644 --- a/requirements-bundle1.txt +++ b/requirements-bundle1.txt @@ -1,4 +1,5 @@ # python 3.8.10 +cached-property == 1.5.2 ipython == 7.16.1 ipywidgets == 7.5.1 markdown2 == 2.3.9 diff --git a/requirements-bundle2.txt b/requirements-bundle2.txt index 081f8ce..20d1a9d 100644 --- a/requirements-bundle2.txt +++ b/requirements-bundle2.txt @@ -1,5 +1,6 @@ # python 3.10.6 # TODO! +cached-property == 1.5.2 ipython == 8.7.0 ipywidgets == 8.0.3 markdown2 == 2.4.6 diff --git a/setup.cfg b/setup.cfg index 05a3ac3..0cfdea1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,6 +35,7 @@ packages = find: python_requires = >=3.7 install_requires = # See also requirements-bundle*.txt. requirements-bundle0 is used as a min constraint. + cached-property == 1.5.2 ipython >= 7.16.1 ipywidgets >= 7.5.1 markdown2 >= 2.3.9