From 7a60532074f5e59d42d4e57a4afabd39107a2246 Mon Sep 17 00:00:00 2001 From: Patrick Carlson Date: Wed, 13 Mar 2024 15:55:06 -0600 Subject: [PATCH] run python black formatter --- dataprofiler/profilers/profiler_options.py | 72 ++++++++++++++++------ 1 file changed, 54 insertions(+), 18 deletions(-) diff --git a/dataprofiler/profilers/profiler_options.py b/dataprofiler/profilers/profiler_options.py index 78241555..4ab1e2f1 100644 --- a/dataprofiler/profilers/profiler_options.py +++ b/dataprofiler/profilers/profiler_options.py @@ -976,9 +976,15 @@ def __str__(self) -> str: :return: str of the option properties :rtype: str """ - dict_string = {'CategoricalOptions': []} - for option in [a for a in dir(self) if not a.startswith('__') and not callable(getattr(self, a))]: - dict_string['CategoricalOptions'].append({str(option): str(getattr(self, option))}) + dict_string = {"CategoricalOptions": []} + for option in [ + a + for a in dir(self) + if not a.startswith("__") and not callable(getattr(self, a)) + ]: + dict_string["CategoricalOptions"].append( + {str(option): str(getattr(self, option))} + ) return json.dumps(dict_string, indent=4) def _validate_helper(self, variable_path: str = "CategoricalOptions") -> list[str]: @@ -1213,9 +1219,15 @@ def __str__(self) -> str: :return: str of the option properties :rtype: str """ - dict_string = {'RowStatisticsOptions': []} - for option in [a for a in dir(self) if not a.startswith('__') and not callable(getattr(self, a))]: - dict_string['RowStatisticsOptions'].append({str(option): str(getattr(self, option))}) + dict_string = {"RowStatisticsOptions": []} + for option in [ + a + for a in dir(self) + if not a.startswith("__") and not callable(getattr(self, a)) + ]: + dict_string["RowStatisticsOptions"].append( + {str(option): str(getattr(self, option))} + ) return json.dumps(dict_string, indent=4) def _validate_helper( @@ -1272,9 +1284,15 @@ def __str__(self) -> str: :return: str of the option properties :rtype: str """ - dict_string = {'DataLabelerOptions': []} - for option in [a for a in dir(self) if not a.startswith('__') and not callable(getattr(self, a))]: - dict_string['DataLabelerOptions'].append({str(option): str(getattr(self, option))}) + dict_string = {"DataLabelerOptions": []} + for option in [ + a + for a in dir(self) + if not a.startswith("__") and not callable(getattr(self, a)) + ]: + dict_string["DataLabelerOptions"].append( + {str(option): str(getattr(self, option))} + ) return json.dumps(dict_string, indent=4) def __deepcopy__(self, memo: dict) -> DataLabelerOptions: @@ -1427,9 +1445,15 @@ def __str__(self) -> str: :return: str of the option properties :rtype: str """ - dict_string = {'TextProfilerOptions': []} - for option in [a for a in dir(self) if not a.startswith('__') and not callable(getattr(self, a))]: - dict_string['TextProfilerOptions'].append({str(option): str(getattr(self, option))}) + dict_string = {"TextProfilerOptions": []} + for option in [ + a + for a in dir(self) + if not a.startswith("__") and not callable(getattr(self, a)) + ]: + dict_string["TextProfilerOptions"].append( + {str(option): str(getattr(self, option))} + ) return json.dumps(dict_string, indent=4) def _validate_helper(self, variable_path: str = "TextProfilerOptions") -> list[str]: @@ -1558,9 +1582,15 @@ def __str__(self) -> str: :return: str of the option properties :rtype: str """ - dict_string = {'StructuredOptions': []} - for option in [a for a in dir(self) if not a.startswith('__') and not callable(getattr(self, a))]: - dict_string['StructuredOptions'].append({str(option): str(getattr(self, option))}) + dict_string = {"StructuredOptions": []} + for option in [ + a + for a in dir(self) + if not a.startswith("__") and not callable(getattr(self, a)) + ]: + dict_string["StructuredOptions"].append( + {str(option): str(getattr(self, option))} + ) return json.dumps(dict_string, indent=4) @property @@ -1721,9 +1751,15 @@ def __str__(self) -> str: :return: str of the option properties :rtype: str """ - dict_string = {'UnstructuredOptions': []} - for option in [a for a in dir(self) if not a.startswith('__') and not callable(getattr(self, a))]: - dict_string['UnstructuredOptions'].append({str(option): str(getattr(self, option))}) + dict_string = {"UnstructuredOptions": []} + for option in [ + a + for a in dir(self) + if not a.startswith("__") and not callable(getattr(self, a)) + ]: + dict_string["UnstructuredOptions"].append( + {str(option): str(getattr(self, option))} + ) return json.dumps(dict_string, indent=4) @property