Skip to content

Commit

Permalink
Remove tailing whitespace in varios classes of docstrings in cadenzaa…
Browse files Browse the repository at this point in the history
…nyltics
  • Loading branch information
Julian Janßen authored and buddemat committed Jun 12, 2024
1 parent f0ac52b commit 3856273
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/cadenzaanalytics/cadenza_analytics_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ def _get_request_data(self, multipart_request) -> AnalyticsRequest:
else:
df_data = pd.DataFrame()

return AnalyticsRequest(metadata, df_data)
return AnalyticsRequest(metadata, df_data)
4 changes: 2 additions & 2 deletions src/cadenzaanalytics/cadenza_analytics_extension_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def add_analytics_extension(self, analytics_extension: CadenzaAnalyticsExtension
----------
analytics_extension : CadenzaAnalyticsExtension
The analytics extension to be added.
"""
"""
self._analytics_extensions.append(analytics_extension)

self._app.add_url_rule("/" + analytics_extension.relative_path,
Expand All @@ -45,7 +45,7 @@ def run_development_server(self, port: int = 5000):
----------
port : int, optional
The port where the service is exposed, default 5000.
"""
"""
self._app.run(port=port)

def __call__(self, *args, **kwargs):
Expand Down
6 changes: 3 additions & 3 deletions src/cadenzaanalytics/request/analytics_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class AnalyticsRequest:
"""A class representing an analytics request.
"""
"""
def __init__(self, metadata: RequestMetadata, data):
self._metadata = metadata
self._data = data
Expand All @@ -16,7 +16,7 @@ def metadata(self) -> RequestMetadata:
-------
RequestMetadata
The metadata associated with the request.
"""
"""
return self._metadata

@property
Expand All @@ -27,5 +27,5 @@ def data(self):
-------
object
The data associated with the request.
"""
"""
return self._data
10 changes: 5 additions & 5 deletions src/cadenzaanalytics/request/request_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_first_column_of_attribute_group(self, attribute_group) -> Optional[Colum
-------
Optional[ColumnMetadata]
The column metadata of the first column in the given attribute group. If no column metadata for the attribute group was send None is returned.
"""
"""
if self.has_columns():
for column in self._get_columns():
if column['attributeGroupName'] == attribute_group:
Expand All @@ -51,7 +51,7 @@ def get_columns_by_attribute_group(self) -> Dict[str, List[ColumnMetadata]]:
-------
Dict[str, List[ColumnMetadata]]
A dictionary where the keys are the attribute group names and values are lists of corresponding column metadata objects.
"""
"""
grouped_columns = {}
columns = self._get_columns() if self.has_columns() else []
for column in columns:
Expand All @@ -69,7 +69,7 @@ def get_columns(self) -> List[ColumnMetadata]:
-------
List[ColumnMetadata]
A list of all column metadata objects.
"""
"""
columns = self._get_columns() if self.has_columns() else []
return [ColumnMetadata._from_dict(column) for column in columns]

Expand All @@ -80,7 +80,7 @@ def get_parameters(self) -> Dict[str, str]:
-------
dict[str, str]
Parameters of the request.
"""
"""
return self._request_metadata['parameters']

def get_parameter(self, name: str) -> Optional[str]:
Expand All @@ -107,7 +107,7 @@ def has_columns(self) -> bool:
-------
bool
True if the request has columns with coresponding metadata, False otherwise.
"""
"""
return (len(self._request_metadata['dataContainers']) > 0
and "columns" in self._request_metadata['dataContainers'][0])

Expand Down
2 changes: 1 addition & 1 deletion src/cadenzaanalytics/response/csv_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_response(self, original_column_metadata: List[ColumnMetadata], original_
-------
Response
The CSV response.
"""
"""
python_3_12 = (3, 12)
if sys.version_info >= python_3_12:
csv_data = self._data.to_csv(
Expand Down
4 changes: 2 additions & 2 deletions src/cadenzaanalytics/response/error_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ErrorResponse(ExtensionResponse):
----------
ExtensionResponse : type
The base extension response type from which ErrorResponse inherits.
"""
"""
def __init__(self, message: str, status: int = 400):
self._message = message
self._status = status
Expand All @@ -27,7 +27,7 @@ def get_response(self, original_column_metadata: List[ColumnMetadata], original_
-------
Response
The error response.
"""
"""
return self._create_response(self._message)

def _get_response_json(self, message: str):
Expand Down
2 changes: 1 addition & 1 deletion src/cadenzaanalytics/response/extension_data_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ExtensionDataResponse(ExtensionResponse):
----------
ExtensionResponse : type
The base extension response type from which ExtensionDataResponse inherits.
"""
"""
def __init__(self, content_type, data_container_name='response-data'):
self._content_type = content_type
self._data_container_name = data_container_name
Expand Down
2 changes: 1 addition & 1 deletion src/cadenzaanalytics/response/extension_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ class ExtensionResponse:
"""
def get_response(self, original_column_metadata: List[ColumnMetadata], original_data: DataFrame):
"""Get the response from the extension.
"""
"""
pass

0 comments on commit 3856273

Please sign in to comment.