Skip to content

Commit

Permalink
chore: google style docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeAeich committed May 24, 2024
1 parent 0babf25 commit 9b6d254
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ pytest-localftpserver = "*"
kubernetes = "*"
pytest-cov = "^5.0.0"

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.lint]
select = [
"E", # pycodestyle
Expand Down
9 changes: 3 additions & 6 deletions tesk/services/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
class ServiceStatusCodes:
"""A class to represent the HTTP status codes.
Attributes
----------
Attributes:
OK (int): HTTP status code for OK.
REDIRECT (int): HTTP status code for Redirect.
CREATED (int): HTTP status code for Created.
Expand Down Expand Up @@ -39,12 +38,10 @@ def get(cls, status_name):
"""Retrieve the corresponding HTTP status code for a given status name.
Args:
----
status_name (str): The name of the HTTP status code to retrieve.
status_name (str): The name of the HTTP status code to retrieve.
Returns:
-------
int or None: Corresponding HTTP status code if found, otherwise None.
int or None: Corresponding HTTP status code if found, otherwise None.
"""
return getattr(cls, status_name.upper(), None)
Expand Down
3 changes: 1 addition & 2 deletions tesk/services/filer_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ def set_backoffLimit(self, limit):
this value.
Args:
----
limit: The number of retries before considering a Job as failed.
limit: The number of retries before considering a Job as failed.
"""
self.spec['spec'].update({'backoffLimit': limit})
Expand Down
3 changes: 1 addition & 2 deletions tesk/services/pvc.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ class PVC:
def __init__(self, name='task-pvc', size_gb=1, namespace='default'):
"""Represent a PersistentVolumeClaim object.
Methods
-------
Methods:
set_volume_mounts(mounts): Sets the volume mounts for the PVC.
get_subpath(): Generates a subpath for the PVC.
create(): Creates the PersistentVolumeClaim.
Expand Down

0 comments on commit 9b6d254

Please sign in to comment.