Skip to content

Commit 4dd3c3d

Browse files
authoredDec 19, 2024··
Move css style related to scwidgets.css_style level (#103)
The css style related functions are not essential for creating a exercise notebook so we move it one level higher. For that we rename the `_css_style.py` to `css_style.py`.
1 parent 441311a commit 4dd3c3d

7 files changed

+6
-10
lines changed
 

‎src/scwidgets/__init__.py

-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
__version__ = "0.1.0-dev0"
22
__authors__ = "the scicode-widgets developer team"
33

4-
from ._css_style import CssStyle, get_css_style
54
from .check import * # noqa: F403
65
from .code import * # noqa: F403
76
from .cue import * # noqa: F403
87
from .exercise import * # noqa: F403
98

109
__all__ = [ # noqa: F405
11-
# css_style
12-
"CssStyle",
13-
"get_css_style",
1410
# cue
1511
"CueWidget",
1612
"CheckCueBox",

‎src/scwidgets/check/_widget_check_registry.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
from ipywidgets import Button, HBox, Layout, Output, VBox, Widget
99

10-
from .._css_style import CssStyle
1110
from .._utils import Formatter
11+
from ..css_style import CssStyle
1212
from ._check import Check, CheckResult
1313

1414

File renamed without changes.

‎src/scwidgets/exercise/_widget_code_exercise.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
from widget_code_input import WidgetCodeInput
1313
from widget_code_input.utils import CodeValidationError
1414

15-
from .._css_style import CssStyle
1615
from .._utils import Formatter
1716
from ..check import Check, CheckableWidget, CheckRegistry, CheckResult
1817
from ..code._widget_code_input import CodeInput
1918
from ..code._widget_parameter_panel import ParameterPanel
19+
from ..css_style import CssStyle
2020
from ..cue import (
2121
CheckCueBox,
2222
CheckResetCueButton,

‎src/scwidgets/exercise/_widget_exercise_registry.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
from IPython.display import display
1212
from ipywidgets import Button, Dropdown, HBox, Label, Layout, Output, Text, VBox
1313

14-
from .._css_style import CssStyle
1514
from .._utils import Formatter
15+
from ..css_style import CssStyle
1616

1717

1818
class ExerciseWidget:

‎src/scwidgets/exercise/_widget_text_exercise.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from ipywidgets import HTML, HBox, HTMLMath, Layout, Output, Textarea, VBox
44

5-
from .._css_style import CssStyle
65
from .._utils import Formatter
6+
from ..css_style import CssStyle
77
from ..cue import SaveCueBox, SaveResetCueButton
88
from ._widget_exercise_registry import ExerciseRegistry, ExerciseWidget
99

‎tests/notebooks/widgets_cue.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
# +
1717
from ipywidgets import Text, VBox
1818

19-
import scwidgets
19+
from scwidgets.css_style import get_css_style
2020
from scwidgets.cue import CheckCueBox, CueBox, ResetCueButton, SaveCueBox, UpdateCueBox
2121

22-
scwidgets.get_css_style()
22+
get_css_style()
2323
# -
2424

2525
# Test 1:

0 commit comments

Comments
 (0)
Please sign in to comment.