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

Commit

Permalink
Rename blacklisted to blocked (#10)
Browse files Browse the repository at this point in the history
* Rename blacklisted to blocked

* Bump version number
  • Loading branch information
TimJentzsch authored Aug 23, 2022
1 parent ef95ecb commit 3ebcb93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions blossom_wrapper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class BlossomStatus(Enum):
already_claimed = auto()
too_many_claims = auto()
already_completed = auto()
blacklisted = auto()
blocked = auto()
coc_not_accepted = auto()
data_missing = auto()
invalid_data = auto()
Expand Down Expand Up @@ -255,7 +255,7 @@ def claim(self, submission_id: str, username: str) -> BlossomResponse:
elif response.status_code == 409:
return BlossomResponse(data=response.json(), status=BlossomStatus.already_claimed)
elif response.status_code == 423:
return BlossomResponse(status=BlossomStatus.blacklisted)
return BlossomResponse(status=BlossomStatus.blocked)
elif response.status_code == 460:
return BlossomResponse(data=response.json(), status=BlossomStatus.too_many_claims)
response.raise_for_status()
Expand All @@ -277,7 +277,7 @@ def unclaim(self, submission_id: str, username: str) -> BlossomResponse:
elif response.status_code == 412:
return BlossomResponse(status=BlossomStatus.missing_prerequisite)
elif response.status_code == 423:
return BlossomResponse(status=BlossomStatus.blacklisted)
return BlossomResponse(status=BlossomStatus.blocked)
response.raise_for_status()
return BlossomResponse()

Expand All @@ -300,7 +300,7 @@ def done(
elif response.status_code == 412:
return BlossomResponse(status=BlossomStatus.missing_prerequisite)
elif response.status_code == 423:
return BlossomResponse(status=BlossomStatus.blacklisted)
return BlossomResponse(status=BlossomStatus.blocked)
elif response.status_code == 428:
return BlossomResponse(status=BlossomStatus.data_missing)
response.raise_for_status()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "blossom-wrapper"
version = "0.5.0"
version = "0.6.0"
description = ""
authors = ["Grafeas Group Ltd. <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 3ebcb93

Please sign in to comment.