Skip to content

Commit 3b5d430

Browse files
committed
formatting and updating Args and returns of docstring
1 parent 4ad4abd commit 3b5d430

File tree

1 file changed

+30
-20
lines changed

1 file changed

+30
-20
lines changed

utils/subject_notes.py

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def fetch_supporting_notes_from_db(
2020
) -> tuple[int, int, pd.DataFrame]:
2121
"""
2222
Retrieves supporting notes from the database using subject and note info.
23-
Args:
23+
Args:
2424
subjects_df (pd.DataFrame): Dataframe containing subject information
2525
nhs_no (str): NHS Number of the subject
2626
note_status (str): Status of the note (e.g., active)
@@ -55,12 +55,14 @@ def verify_note_content_matches_expected(
5555
) -> None:
5656
"""
5757
Verifies that the title and note fields from the DataFrame match the expected values.
58-
59-
:param notes_df: DataFrame containing the actual note data.
60-
:param expected_title: Expected note title.
61-
:param expected_note: Expected note content.
62-
:param nhs_no: NHS Number of the subject (for logging).
63-
:param type_id: Note type ID (for logging).
58+
Args:
59+
notes_df (pd.DataFrame): DataFrame containing the actual note data.
60+
expected_title (str): Expected note title.
61+
expected_note (str): Expected note content.
62+
nhs_no (str): NHS Number of the subject (for logging).
63+
type_id (int): Note type ID (for logging).
64+
Returns:
65+
None
6466
"""
6567
logging.info(
6668
f"Verifying that the title and note match the provided values for type_id: {type_id}."
@@ -85,12 +87,16 @@ def verify_note_content_ui_vs_db(
8587
title_prefix_to_strip: Optional[str] = None,
8688
) -> None:
8789
"""
88-
Verifies that the note title and content from the UI match the database values.
90+
Verifies that the note title and content from the UI match the database values.
8991
90-
:param page: The page object to interact with UI
91-
:param notes_df: DataFrame containing note data from DB
92-
:param row_index: The row index in the UI table to fetch data from (default is 2)
93-
:param title_prefix_to_strip: Optional prefix to remove from UI title (e.g., "Subject Kit Note -")
92+
Args:
93+
page (Page): The page object to interact with the UI.
94+
notes_df (pd.DataFrame): DataFrame containing note data from the database.
95+
row_index (int): The row index in the UI table to fetch data from (default is 2).
96+
title_prefix_to_strip (str, optional): Optional prefix to remove from the UI title (e.g., "Subject Kit Note -").
97+
98+
Returns:
99+
None
94100
"""
95101
ui_data = SubjectEventsNotes(page).get_title_and_note_from_row(row_index)
96102
logging.info(f"Data from UI: {ui_data}")
@@ -123,14 +129,18 @@ def verify_note_removal_and_obsolete_transition(
123129
status_obsolete_key: str,
124130
) -> None:
125131
"""
126-
Verifies that a note was removed from active notes and appears in obsolete notes.
127-
128-
:param subjects_df: DataFrame with subject details
129-
:param ui_data: Dict with 'title' and 'note' from UI
130-
:param general_properties: Dictionary with environment settings
131-
:param note_type_key: Key to access the note type from general_properties
132-
:param status_active_key: Key for active status
133-
:param status_obsolete_key: Key for obsolete status
132+
Verifies that a note was removed from active notes and appears in obsolete notes.
133+
134+
Args:
135+
subjects_df (pd.DataFrame): DataFrame with subject details.
136+
ui_data (dict): Dictionary with 'title' and 'note' from the UI.
137+
general_properties (dict): Dictionary with environment settings.
138+
note_type_key (str): Key to access the note type from general_properties.
139+
status_active_key (str): Key for active status.
140+
status_obsolete_key (str): Key for obsolete status.
141+
142+
Returns:
143+
None
134144
"""
135145
screening_subject_id = int(subjects_df["screening_subject_id"].iloc[0])
136146
logging.info(f"Screening Subject ID retrieved: {screening_subject_id}")

0 commit comments

Comments
 (0)