Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
Added return value for 'ping', as I remember it's used in assertions …
Browse files Browse the repository at this point in the history
…by users
  • Loading branch information
why-not-try-calmer committed Feb 16, 2023
1 parent 06c031d commit b2d7917
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion pytransifex/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,13 @@ def project_exists(self, project_slug: str) -> bool:
)

@ensure_login
def ping(self):
def ping(self) -> bool:
"""
Exposing this just for the sake of satisfying qgis-plugin-cli's expectations
There is no need to ping the server on the current implementation, as connection is handled by the SDK
"""
logging.info("'ping' is deprecated!")
return True

@ensure_login
def get_project_stats(self, project_slug: str) -> dict[str, Any]:
Expand Down
5 changes: 2 additions & 3 deletions pytransifex/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ class Tx(ABC):
# TODO
# This interface modelled after api.py:Transifex satisfies the expectations of qgis-plugin-cli
# but it falls short of requiring an implementation for methods that qgis-plugin-cli does not use:
# coordinator, create_translation, delete_project, delete_resource, delete_team
# The question is whether I should implement them. Is there's a consumer downstream?
# { coordinator, create_translation, delete_project, delete_resource, delete_team }

@abstractmethod
def create_project(
Expand Down Expand Up @@ -77,5 +76,5 @@ def project_exists(self, project_slug: str) -> bool:
raise NotImplementedError

@abstractmethod
def ping(self):
def ping(self) -> bool:
raise NotImplementedError

0 comments on commit b2d7917

Please sign in to comment.