Skip to content

Do not use mutable default arguments #800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions msgraph/graph_request_adapter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Dict, Optional
from typing import Optional
import httpx
from kiota_abstractions.authentication import AuthenticationProvider
from kiota_http.middleware.options import UrlReplaceHandlerOption
Expand All @@ -20,5 +20,7 @@

class GraphRequestAdapter(BaseGraphRequestAdapter):
def __init__(self, auth_provider: AuthenticationProvider,
client: Optional[httpx.AsyncClient] = GraphClientFactory.create_with_default_middleware(options=options)) -> None:
client: Optional[httpx.AsyncClient] = None) -> None:
if client is None:
client = GraphClientFactory.create_with_default_middleware(options=options)
super().__init__(auth_provider, http_client=client)