agi-med-common 3.5.0__py3-none-any.whl → 3.5.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agi_med_common/__init__.py +1 -1
- agi_med_common/models/enums/moderation_label_enum.py +1 -0
- agi_med_common/xml_parser.py +3 -2
- {agi_med_common-3.5.0.dist-info → agi_med_common-3.5.2.dist-info}/METADATA +1 -1
- {agi_med_common-3.5.0.dist-info → agi_med_common-3.5.2.dist-info}/RECORD +7 -7
- {agi_med_common-3.5.0.dist-info → agi_med_common-3.5.2.dist-info}/WHEEL +1 -1
- {agi_med_common-3.5.0.dist-info → agi_med_common-3.5.2.dist-info}/top_level.txt +0 -0
agi_med_common/__init__.py
CHANGED
agi_med_common/xml_parser.py
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
import re
|
2
|
+
from enum import StrEnum
|
2
3
|
|
3
4
|
|
4
5
|
class XMLParser:
|
5
6
|
@staticmethod
|
6
|
-
def make_xml(body: str, tag: str) -> str:
|
7
|
+
def make_xml(body: str, tag: str | StrEnum) -> str:
|
7
8
|
return f"<{tag}>{body}</{tag}>"
|
8
9
|
|
9
10
|
@staticmethod
|
@@ -12,6 +13,6 @@ class XMLParser:
|
|
12
13
|
return re.sub(re_xml, "", text).replace(" ", " ").strip()
|
13
14
|
|
14
15
|
@staticmethod
|
15
|
-
def get_tag_list(response: str, tag: str) -> list[str]:
|
16
|
+
def get_tag_list(response: str, tag: str | StrEnum) -> list[str]:
|
16
17
|
tag_content = re.findall(f"<{tag}>(.*?)</{tag}>", response, re.DOTALL)
|
17
18
|
return [content.lower().strip() for content in tag_content]
|
@@ -1,7 +1,7 @@
|
|
1
|
-
agi_med_common/__init__.py,sha256=
|
1
|
+
agi_med_common/__init__.py,sha256=Cg1mW1OsXbMDqBMjmc3xXRg_sbcdDifdTxyGrwLO4G0,511
|
2
2
|
agi_med_common/utils.py,sha256=4GV1yNZiRG3KYOh859dvOZI899z7_s_YN3aXzthMgwU,399
|
3
3
|
agi_med_common/validators.py,sha256=R678gjPp-5XbnocRuEtdOQgJyCCOurxwaOe2nT04kSg,705
|
4
|
-
agi_med_common/xml_parser.py,sha256=
|
4
|
+
agi_med_common/xml_parser.py,sha256=VvLIX_XCZao9i0qqpTVx8nx0vbFXSe8pEbdJdXnj97g,568
|
5
5
|
agi_med_common/logger/__init__.py,sha256=RW_0VZtbeJ4RsLqUXZUQWl5CtV9g840rU7qRlf5u49E,96
|
6
6
|
agi_med_common/logger/log_level_enum.py,sha256=lWuSMho9I0v_xf1RuwpERx5o8NJXaavjwxSdh8fxMqE,477
|
7
7
|
agi_med_common/logger/logger.py,sha256=-VU69ULbw2-pNpOcxKiMpOeRAPe6H-EsGV9WRTv1SUo,839
|
@@ -18,12 +18,12 @@ agi_med_common/models/enums/__init__.py,sha256=wnI9ub2F1L-TTB2jIpVF3OTLFr0QzcQjW
|
|
18
18
|
agi_med_common/models/enums/action_enum.py,sha256=ZZtSBlOsQWvJ1UYqmsMsVLrzO1kJdImqJMqI0_KSV9M,287
|
19
19
|
agi_med_common/models/enums/diagnostics_xml_tag_enum.py,sha256=aiUJpe5joh5EOcJ5sk1Xs003XkRry2CBL6H-bIEiapA,278
|
20
20
|
agi_med_common/models/enums/doctor_choice_xml_tag_enum.py,sha256=MsSFI0vFHJVujhoj7fNX-fcGVV3jMF_nEDOJnjzh4ac,291
|
21
|
-
agi_med_common/models/enums/moderation_label_enum.py,sha256=
|
21
|
+
agi_med_common/models/enums/moderation_label_enum.py,sha256=lbGG4Pu7cQp57uEyQEptNeYsQszK6yyxJ5AEhq4SGkE,292
|
22
22
|
agi_med_common/models/enums/mtrs_label_enum.py,sha256=6emBndt3SCsQVZZFKQYCV2_iyjjmZEhwejJKJu39ZAw,257
|
23
23
|
agi_med_common/models/enums/mtrs_xml_tag_enum.py,sha256=6OxuRsrx4b2uBjfrBgm4Y789Ly337_mQXL9VPRCpLyg,273
|
24
24
|
agi_med_common/models/enums/state_enum.py,sha256=p7XhDxBxPeeSgbLWitq6JpJLKntS3XMHon_EevbnhEs,163
|
25
25
|
agi_med_common/models/enums/track_id_enum.py,sha256=YoP15BTGjaFDxCOtjsqfwuMTW-BhcaQyEdxLfK7RQUA,454
|
26
|
-
agi_med_common-3.5.
|
27
|
-
agi_med_common-3.5.
|
28
|
-
agi_med_common-3.5.
|
29
|
-
agi_med_common-3.5.
|
26
|
+
agi_med_common-3.5.2.dist-info/METADATA,sha256=lY_oqPzB1m7fHR8GgrSK3qSrGwxKfjUtnDSNNBZZ4kk,520
|
27
|
+
agi_med_common-3.5.2.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
28
|
+
agi_med_common-3.5.2.dist-info/top_level.txt,sha256=26o565jF_7wYQj7-YJfTedtT9yDxDcf8RNikOYuPq78,15
|
29
|
+
agi_med_common-3.5.2.dist-info/RECORD,,
|
File without changes
|