Skip to content

Commit

Permalink
Update drive.py, remove errant trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffbryner authored Nov 23, 2024
1 parent c4885bc commit c87ca0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/community/langchain_google_community/drive.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class GoogleDriveLoader(BaseLoader, BaseModel):
token_path: Path = Path.home() / ".credentials" / "token.json"
"""Path to the token file."""
credentials: Any = None
"""Your own google credentials created via your own mechanism"""
"""Your own google credentials created via your own mechanism"""
folder_id: Optional[str] = None
"""The folder id to load from."""
document_ids: Optional[List[str]] = None
Expand Down Expand Up @@ -281,8 +281,8 @@ def _load_credentials(self) -> Any:
if self.credentials:
# use whatever was passed to us
creds = self.credentials
return creds
return creds

if not creds or not creds.valid:
if creds and creds.expired and creds.refresh_token:
creds.refresh(Request())
Expand Down

0 comments on commit c87ca0e

Please sign in to comment.