community: Refactor PebbloSafeLoader (#25582)

**Refactor PebbloSafeLoader**
  - Created `APIWrapper` and moved API logic into it.
  - Moved helper functions to the utility file.
  - Created smaller functions and methods for better readability.
  - Properly read environment variables.
  - Removed unused code.

**Issue:** NA
**Dependencies:** NA
**tests**:  Updated
This commit is contained in:
Rajendra Kadam
2024-08-22 21:16:52 +05:30
committed by GitHub
parent 5e3a321f71
commit 1f1679e960
3 changed files with 422 additions and 327 deletions

View File

@@ -144,4 +144,5 @@ def test_pebblo_safe_loader_api_key() -> None:
)
# Assert
assert loader.api_key == api_key
assert loader.pb_client.api_key == api_key
assert loader.pb_client.classifier_location == "local"