From 97ec6a2306387e2b8c5876ac6dfb725ca40975c6 Mon Sep 17 00:00:00 2001 From: Yuchen Ethan Xiao Date: Thu, 6 Feb 2025 18:17:59 -0500 Subject: [PATCH 1/2] fix: import parser moduels in its __init__ --- news/import_parser.rst | 23 +++++++++++++++++++++++ src/diffpy/utils/parsers/__init__.py | 4 ++++ 2 files changed, 27 insertions(+) create mode 100644 news/import_parser.rst diff --git a/news/import_parser.rst b/news/import_parser.rst new file mode 100644 index 00000000..5ef0e001 --- /dev/null +++ b/news/import_parser.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* import parsers modules in its __init__.py for consistent API. + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/src/diffpy/utils/parsers/__init__.py b/src/diffpy/utils/parsers/__init__.py index a0278e27..328ba920 100644 --- a/src/diffpy/utils/parsers/__init__.py +++ b/src/diffpy/utils/parsers/__init__.py @@ -13,3 +13,7 @@ # ############################################################################## """Various utilities related to data parsing and manipulation.""" + +from diffpy.utils.parsers import loaddata +from diffpy.utils.parsers import custom_exceptions +from diffpy.utils.parsers import serialization From ef107547c3e6ab3eedc8fc0bc2ab6b7dd7fe0e25 Mon Sep 17 00:00:00 2001 From: Yuchen Ethan Xiao Date: Thu, 6 Feb 2025 18:47:35 -0500 Subject: [PATCH 2/2] style: adding flake8 ignore to imports --- src/diffpy/utils/parsers/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/diffpy/utils/parsers/__init__.py b/src/diffpy/utils/parsers/__init__.py index 328ba920..98ef6c9f 100644 --- a/src/diffpy/utils/parsers/__init__.py +++ b/src/diffpy/utils/parsers/__init__.py @@ -14,6 +14,6 @@ ############################################################################## """Various utilities related to data parsing and manipulation.""" -from diffpy.utils.parsers import loaddata -from diffpy.utils.parsers import custom_exceptions -from diffpy.utils.parsers import serialization +from diffpy.utils.parsers import custom_exceptions # noqa: F401 +from diffpy.utils.parsers import loaddata # noqa: F401 +from diffpy.utils.parsers import serialization # noqa: F401