Skip to content

Commit 2bedf91

Browse files
committed
A002 reenabled
1 parent b7cefb2 commit 2bedf91

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ lint.ignore = [
9494
"T201", # `print` found"
9595
"SIM105", # Use `contextlib.suppress`
9696
"S110", # `try`-`except`-`pass` detected, consider logging the exception
97-
"A002", # Function argument shadowing a Python builtin
9897
"E701", # Multiple statements on one line (colon)
9998
"E741", # Ambiguous variable name
10099
]

src/petab_gui/commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def _convert_dtype_with_nullable_int(series, dtype):
2525
# Check if it's already a pandas nullable int type
2626
is_pandas_nullable_int = isinstance(
2727
dtype,
28-
(pd.Int64Dtype, pd.Int32Dtype, pd.Int16Dtype, pd.Int8Dtype),
28+
pd.Int64Dtype | pd.Int32Dtype | pd.Int16Dtype | pd.Int8Dtype,
2929
)
3030

3131
if is_pandas_nullable_int:
@@ -306,7 +306,7 @@ def _apply_changes(self, use_new: bool):
306306
# For numeric types, convert string inputs to numbers first
307307
is_pandas_nullable_int = isinstance(
308308
dtype,
309-
(pd.Int64Dtype, pd.Int32Dtype, pd.Int16Dtype, pd.Int8Dtype),
309+
pd.Int64Dtype | pd.Int32Dtype | pd.Int16Dtype | pd.Int8Dtype,
310310
)
311311
if is_pandas_nullable_int or np.issubdtype(dtype, np.number):
312312
df[col] = pd.to_numeric(df[col], errors="coerce")

src/petab_gui/models/pandas_table_model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,12 +1127,12 @@ class MeasurementModel(PandasTableModel):
11271127
possibly_new_condition = Signal(str) # Signal for new condition
11281128
possibly_new_observable = Signal(str) # Signal for new observable
11291129

1130-
def __init__(self, data_frame, type: str = "measurement", parent=None):
1131-
allowed_columns = COLUMNS[type].copy()
1130+
def __init__(self, data_frame, parent=None):
1131+
allowed_columns = COLUMNS["measurement"].copy()
11321132
super().__init__(
11331133
data_frame=data_frame,
11341134
allowed_columns=allowed_columns,
1135-
table_type=type,
1135+
table_type="measurement",
11361136
parent=parent,
11371137
)
11381138

0 commit comments

Comments
 (0)