mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Rename github to github_tools so that modules don't conflict with PyGithub (#223)
This commit is contained in:
@@ -9,7 +9,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
import github_helpers
|
||||
from github_tools import github_helpers
|
||||
|
||||
|
||||
_TEST_QUERY = """
|
||||
@@ -11,9 +11,16 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
import argparse
|
||||
import datetime
|
||||
import hashlib
|
||||
import os
|
||||
import sys
|
||||
import textwrap
|
||||
|
||||
import github_helpers
|
||||
# To support direct runs, ensure the pythonpath has the repo root.
|
||||
_PYTHONPATH = os.path.realpath(os.path.join(os.path.dirname(__file__), ".."))
|
||||
if _PYTHONPATH not in sys.path:
|
||||
sys.path.insert(0, _PYTHONPATH)
|
||||
|
||||
from github_tools import github_helpers
|
||||
|
||||
# The main query, into which other queries are composed.
|
||||
_QUERY = """
|
||||
@@ -10,7 +10,7 @@ import os
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
import pr_comments
|
||||
from github_tools import pr_comments
|
||||
|
||||
|
||||
class TestPRComments(unittest.TestCase):
|
||||
@@ -14,12 +14,19 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
|
||||
# https://github.com/PyGithub/PyGithub
|
||||
# GraphQL is preferred, but falling back to pygithub for unsupported mutations.
|
||||
import github
|
||||
|
||||
import github_helpers
|
||||
# To support direct runs, ensure the pythonpath has the repo root.
|
||||
_PYTHONPATH = os.path.realpath(os.path.join(os.path.dirname(__file__), ".."))
|
||||
if _PYTHONPATH not in sys.path:
|
||||
sys.path.insert(0, _PYTHONPATH)
|
||||
|
||||
from github_tools import github_helpers
|
||||
|
||||
# The organization to mirror members from.
|
||||
_ORG = "carbon-language"
|
||||
@@ -10,8 +10,8 @@ import github
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
import github_helpers
|
||||
import update_label_access
|
||||
from github_tools import github_helpers
|
||||
from github_tools import update_label_access
|
||||
|
||||
|
||||
class TestUpdateLabelAccess(unittest.TestCase):
|
||||
Reference in New Issue
Block a user