Skip to content

Commit

Permalink
extract transport args from init
Browse files Browse the repository at this point in the history
  • Loading branch information
frascuchon committed Jan 21, 2025
1 parent 713b58e commit c65c5c6
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions argilla/src/argilla/_api/_http/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import inspect
from dataclasses import dataclass

import httpx
Expand All @@ -27,18 +27,7 @@ class HTTPClientConfig:
retries: int = 5


TRANSPORT_ARGS = [
"verify",
"cert",
"http1",
"http2",
"limits",
"trust_env",
"proxy",
"uds",
"local_address",
"socket_options",
] # See httpx.HTTPTransport init for more details
TRANSPORT_ARGS = inspect.getfullargspec(httpx.HTTPTransport.__init__).args


def create_http_client(api_url: str, api_key: str, timeout: int, retries: int, **client_args) -> httpx.Client:
Expand Down

0 comments on commit c65c5c6

Please sign in to comment.