Skip to content

Commit a5475db

Browse files
committed
Ruff adherence
1 parent c96326d commit a5475db

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/petab_gui/controllers/table_controllers.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ def _detect_time_column(self, df) -> str | None:
770770
return None
771771

772772
def _rank_dose_candidates(self, df) -> list[str]:
773-
"""Lightweight ranking of dose-like columns (regex + numeric + cardinality)."""
773+
"""Lightweight ranking of dose-like columns."""
774774
patt = re.compile(
775775
r"\b(dose|conc|concentration|drug|compound|stim|input|u\d+)\b",
776776
re.IGNORECASE,
@@ -786,7 +786,9 @@ def _rank_dose_candidates(self, df) -> list[str]:
786786
uniq = df[col].nunique(dropna=True)
787787
if 2 <= uniq <= 30:
788788
s += 0.8
789-
if np.all(pd.to_numeric(df[col], errors="coerce").fillna(0) >= 0):
789+
if np.all(
790+
pd.to_numeric(df[col], errors="coerce").fillna(0) >= 0
791+
):
790792
s += 0.3
791793
ser = pd.to_numeric(df[col], errors="coerce").dropna()
792794
if len(ser) >= 5:
@@ -805,7 +807,7 @@ def _rank_dose_candidates(self, df) -> list[str]:
805807
]
806808

807809
def _resolve_dose_and_time(self, df) -> tuple[str | None, str | None, str]:
808-
"""Open dialog with ranked dose suggestions and time choices (incl. steady state)."""
810+
"""Open dialog with ranked dose suggestions and time choices."""
809811
header_key = str(hash(tuple(df.columns)))
810812
settings = settings_manager.settings
811813
# TODO: rename settings location

0 commit comments

Comments
 (0)