Skip to content

Commit

Permalink
Black/flake8 tidy ups.
Browse files Browse the repository at this point in the history
  • Loading branch information
ntoll committed Jan 20, 2024
1 parent 47c3958 commit dbc1d2c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/invent/ui/widgets/textbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
limitations under the License.
"""
from pyscript import document
#from pyscript.js_modules import showdown

# from pyscript.js_modules import showdown
from invent.ui import Widget


Expand Down Expand Up @@ -52,8 +53,8 @@ def update(self):
"""
if self.element:
...
#converter = showdown.Converter.new()
#self.element.innerHTML = converter.makeHtml(self.content)
# converter = showdown.Converter.new()
# self.element.innerHTML = converter.makeHtml(self.content)

def render_into(self, container):
self.element = document.createElement("div")
Expand Down
3 changes: 2 additions & 1 deletion tests/test_i18n.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import invent
import pytest
import json
from unittest import mock
from pyscript import window
Expand Down Expand Up @@ -63,6 +62,7 @@ def test_set_language():
assert mock_publish.call_args_list[0][1]["to_channel"] == "i18n"
invent.i18n.set_language(current_lang)


def test_get_language():
"""
Simply returns the current default language.
Expand All @@ -71,6 +71,7 @@ def test_get_language():
invent.i18n.set_language("foo")
assert invent.i18n.get_language() == "foo"


def test_():
"""
Ensure the _ utility function for translating strings on the fly works
Expand Down
5 changes: 2 additions & 3 deletions tests/ui/test_core.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import pytest
from invent.ui import Button, core
from pyscript import document


def test_widget_init_defaults():
Expand Down Expand Up @@ -42,5 +41,5 @@ def test_widget_set_position_fill():
container = core.Column(name="test_column")
container.append(b)
b.set_position(container)
assert w.element.style.width == "100%"
assert w.element.style.height == "100%"
assert b.element.style.width == "100%"
assert b.element.style.height == "100%"

0 comments on commit dbc1d2c

Please sign in to comment.