Skip to content

Commit

Permalink
Fixed linting Description Fixed linting related issue that were induc…
Browse files Browse the repository at this point in the history
…ed by squash
  • Loading branch information
X1Vi committed Jan 11, 2025
2 parents 29ac543 + 0e671ba commit 1e2dc49
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion zulip/integrations/google/get-google-credentials
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ from google.oauth2.credentials import Credentials
from google_auth_oauthlib.flow import InstalledAppFlow

flags = argparse.ArgumentParser(description="Google Calendar Bot")
flags.add_argument("--noauth_local_webserver", action="store_true", help="Run OAuth flow in console instead of opening a web browser.")
flags.add_argument(
"--noauth_local_webserver",
action="store_true",
help="Run OAuth flow in console instead of opening a web browser.",
)
args = flags.parse_args()

# If modifying these scopes, delete your previously saved credentials
Expand All @@ -22,6 +26,7 @@ APPLICATION_NAME = "Zulip Calendar Bot"
HOME_DIR = os.path.expanduser("~")
CREDENTIALS_PATH = os.path.join(HOME_DIR, "google-credentials.json")


def get_credentials() -> Credentials:
"""Gets valid user credentials from storage.
Expand Down
2 changes: 2 additions & 0 deletions zulip/integrations/google/google-calendar
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ if not options.zulip_email:

zulip_client = zulip.init_from_options(options)


def get_credentials() -> Credentials:
"""Gets valid user credentials from storage.
Expand Down Expand Up @@ -111,6 +112,7 @@ def get_credentials() -> Credentials:

return creds


def populate_events() -> Optional[None]:
credentials = get_credentials()
service = build("calendar", "v3", credentials=credentials)
Expand Down

0 comments on commit 1e2dc49

Please sign in to comment.