Skip to content

Commit

Permalink
patch: destination file edit on name change (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
FBruzzesi authored Jun 13, 2024
1 parent f7ae70e commit 4086a8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ coverage:
types:
mypy $(sources)

check: lint test types clean-folders
check: lint test-cov types clean-folders

docs-serve:
mkdocs serve
Expand Down
11 changes: 5 additions & 6 deletions sksmithy/tui/_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ def on_input_change(self: Self, event: Input.Changed) -> None:
)
else:
output_file = self.app.query_one("#output-file", Input)
if not output_file.value:
output_file.value = f"{event.value.lower()}.py"
output_file.value = f"{event.value.lower()}.py"


class Estimator(Container):
Expand Down Expand Up @@ -162,8 +161,8 @@ class SampleWeight(Container):

def compose(self: Self) -> ComposeResult:
yield Horizontal(
Prompt(PROMPT_SAMPLE_WEIGHT, classes="label"),
Switch(id="sample_weight"),
Prompt(PROMPT_SAMPLE_WEIGHT, classes="label"),
classes="container",
)

Expand All @@ -173,8 +172,8 @@ class Linear(Container):

def compose(self: Self) -> ComposeResult:
yield Horizontal(
Prompt(PROMPT_LINEAR, classes="label"),
Switch(id="linear"),
Prompt(PROMPT_LINEAR, classes="label"),
classes="container",
)

Expand All @@ -190,8 +189,8 @@ class PredictProba(Container):

def compose(self: Self) -> ComposeResult:
yield Horizontal(
Prompt(PROMPT_PREDICT_PROBA, classes="label"),
Switch(id="predict_proba"),
Prompt(PROMPT_PREDICT_PROBA, classes="label"),
classes="container",
)

Expand All @@ -201,8 +200,8 @@ class DecisionFunction(Container):

def compose(self: Self) -> ComposeResult:
yield Horizontal(
Prompt(PROMPT_DECISION_FUNCTION, classes="label"),
Switch(id="decision_function"),
Prompt(PROMPT_DECISION_FUNCTION, classes="label"),
classes="container",
)

Expand Down

0 comments on commit 4086a8c

Please sign in to comment.