Skip to content

Commit

Permalink
removed _headers
Browse files Browse the repository at this point in the history
  • Loading branch information
michgur committed Aug 9, 2023
1 parent 725af50 commit 317298e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
3 changes: 2 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ pytest-dependency==0.5.1
mypy==1.1.1
python-dotenv==1.0.0; python_version > "3.7"
python-dotenv==0.21.1; python_version <= "3.7"
coveralls==3.2.0
coveralls==3.2.0
twine==4.0.1
2 changes: 0 additions & 2 deletions src/oneai/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,3 @@ def get_or_create_uuid() -> str:


uuid = get_or_create_uuid()

_headers = {}
2 changes: 0 additions & 2 deletions src/oneai/api/clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ def get_clustering(path: str, params: dict, api_key: str = None):
"api-key": api_key,
"Content-Type": "application/json",
"User-Agent": f"python-sdk/{oneai.__version__}/{oneai.api.uuid}",
**oneai.api._headers,
}
if oneai.DEBUG_LOG_REQUESTS:
oneai.logger.debug(f"GET {oneai.URL}/{ENDPOINT}/{path}\n")
Expand All @@ -106,7 +105,6 @@ def post_clustering(path: str, data: dict, api_key: str = None):
"api-key": api_key,
"Content-Type": "application/json",
"User-Agent": f"python-sdk/{oneai.__version__}/{oneai.api.uuid}",
**oneai.api._headers,
}
if oneai.DEBUG_LOG_REQUESTS:
oneai.logger.debug(f"POST {oneai.URL}/{ENDPOINT}/{path}\n")
Expand Down
3 changes: 0 additions & 3 deletions src/oneai/api/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ async def post_pipeline(
"api-key": api_key,
"Content-Type": "application/json",
"User-Agent": f"python-sdk/{oneai.__version__}/{oneai.api.uuid}",
**oneai.api._headers,
}

if oneai.DEBUG_LOG_REQUESTS:
Expand Down Expand Up @@ -108,7 +107,6 @@ async def post_pipeline_async(
"api-key": api_key,
"Content-Type": "application/json",
"User-Agent": f"python-sdk/{oneai.__version__}/{oneai.api.uuid}",
**oneai.api._headers,
}
data = input.text if is_file else request

Expand Down Expand Up @@ -141,7 +139,6 @@ async def get_task_status(
headers = {
"api-key": api_key,
"User-Agent": f"python-sdk/{oneai.__version__}/{oneai.api.uuid}",
**oneai.api._headers,
}

if oneai.DEBUG_LOG_REQUESTS:
Expand Down

0 comments on commit 317298e

Please sign in to comment.