Skip to content

Commit

Permalink
run python black formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
carlsonp committed Mar 13, 2024
1 parent abfddaa commit 7a60532
Showing 1 changed file with 54 additions and 18 deletions.
72 changes: 54 additions & 18 deletions dataprofiler/profilers/profiler_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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]:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7a60532

Please sign in to comment.