• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mozilla / relman-auto-nag / #5402

06 Feb 2025 01:34AM CUT coverage: 21.189% (-0.01%) from 21.2%
#5402

push

coveralls-python

web-flow
Bump pre-commit from 4.0.1 to 4.1.0 (#2580)

Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pre-commit/pre-commit/compare/v4.0.1...v4.1.0)

---
updated-dependencies:
- dependency-name: pre-commit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

426 of 2950 branches covered (14.44%)

1942 of 9165 relevant lines covered (21.19%)

0.21 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/bugbot/gcp.py
1
from typing import Iterable, Optional
×
2

3
from google.cloud import bigquery
×
4
from google.oauth2 import service_account
×
5

6
from bugbot import utils
×
7

8
SCOPES = {
×
9
    "cloud-platform": "https://www.googleapis.com/auth/cloud-platform",
10
    "drive": "https://www.googleapis.com/auth/drive",
11
}
12

13

14
def get_bigquery_client(
×
15
    project: str, scopes: Optional[Iterable[str]] = None
16
) -> bigquery.Client:
17
    """Get a bigquery.Client for a given project
18

19
    Args:
20
        project: Name of the project.
21
        scopes: Optional iterable containing the scopes the client should have.
22
                By default this will be the cloud-platform scopes required to
23
                run queries.
24
    Returns:
25
        bigquery.Client
26
    """
27
    scope_urls = (
×
28
        [SCOPES["cloud-platform"]]
29
        if scopes is None
30
        else [SCOPES.get(item, item) for item in scopes]
31
    )
32

33
    credentials = service_account.Credentials.from_service_account_info(
×
34
        utils.get_gcp_service_account_info()
35
    ).with_scopes(scope_urls)
36

37
    return bigquery.Client(project=project, credentials=credentials)
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc