mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
Switch mypy approach to pre-commit (#1234)
I'm treating my PR to mypy bazel integration as dead in the water. Abandoning that approach, this seems to work reasonably well as a replacement. It's actually a slightly newer version of mypy too -- the bazel integration was stuck on an old version. Note I don't think we're losing much: we shouldn't be writing too much python.
This commit is contained in:
@@ -14,8 +14,8 @@ import os
|
||||
from typing import Dict, Generator, Optional, Tuple
|
||||
|
||||
# https://pypi.org/project/gql/
|
||||
import gql
|
||||
import gql.transport.requests
|
||||
import gql # type: ignore
|
||||
import gql.transport.requests # type: ignore
|
||||
|
||||
_ENV_TOKEN = "GITHUB_ACCESS_TOKEN"
|
||||
|
||||
@@ -52,7 +52,7 @@ class Client(object):
|
||||
url="https://api.github.com/graphql",
|
||||
headers={"Authorization": "bearer %s" % parsed_args.access_token},
|
||||
)
|
||||
self._client = gql.Client(transport=transport) # type: ignore
|
||||
self._client = gql.Client(transport=transport)
|
||||
|
||||
def execute(self, query: str) -> Dict:
|
||||
"""Runs a query."""
|
||||
|
||||
Reference in New Issue
Block a user