Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
PSchmiedmayer committed Aug 26, 2024
1 parent 2455245 commit 0d92135
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions ecg_data_manager/modules/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,13 @@ def plot_single_ecg(self, row): # pylint: disable=too-many-locals
)

user_id = (
row[ColumnNames.USER_ID.value]
if row[ColumnNames.USER_ID.value] is not None
row[ColumnNames.USER_ID.value]
if row[ColumnNames.USER_ID.value] is not None
else "Unknown"
)

heart_rate = (
int(row[ColumnNames.HEART_RATE.value])
if row[ColumnNames.HEART_RATE.value] is not None
int(row[ColumnNames.HEART_RATE.value])
if row[ColumnNames.HEART_RATE.value] is not None
else "Unknown"
)
ecg_interpretation = (
Expand Down Expand Up @@ -607,7 +606,6 @@ def save_diagnosis( # pylint: disable=too-many-locals, too-many-arguments
"saved successfully.✓</span>"
)
display(data_saved_html)

else:
print(
"ECG has already been reviewed. No further review is required."
Expand Down Expand Up @@ -941,17 +939,15 @@ def plot_single_ecg(self, row): # pylint: disable=too-many-locals
)

user_id = (
row[ColumnNames.USER_ID.value]
if row[ColumnNames.USER_ID.value] is not None
row[ColumnNames.USER_ID.value]
if row[ColumnNames.USER_ID.value] is not None
else "Unknown"
)

heart_rate = (
int(row[ColumnNames.HEART_RATE.value])
if row[ColumnNames.HEART_RATE.value] is not None
int(row[ColumnNames.HEART_RATE.value])
if row[ColumnNames.HEART_RATE.value] is not None
else "Unknown"
)

ecg_interpretation = (
row[ColumnNames.APPLE_ELECTROCARDIOGRAM_CLASSIFICATION.value]
if row[ColumnNames.APPLE_ELECTROCARDIOGRAM_CLASSIFICATION.value] is not None
Expand Down

0 comments on commit 0d92135

Please sign in to comment.