justinabrahms / imhotep
Showing 2 of 4 files from the diff.

@@ -1,6 +1,6 @@
Loading
1 1
import json
2 2
import logging
3 -
from typing import Dict
3 +
from typing import Dict, Optional
4 4
5 5
import requests
6 6
from requests.auth import HTTPBasicAuth
@@ -22,8 +22,10 @@
Loading
22 22
        self.username = username
23 23
        self.password = password
24 24
25 -
    def get_auth(self) -> HTTPBasicAuth:
26 -
        return HTTPBasicAuth(self.username, self.password)
25 +
    def get_auth(self) -> Optional[HTTPBasicAuth]:
26 +
        if self.username and self.password:
27 +
            return HTTPBasicAuth(self.username, self.password)
28 +
        return None
27 29
28 30
    def get(self, url: str) -> Response:
29 31
        log.debug("Fetching %s", url)

@@ -61,6 +61,10 @@
Loading
61 61
62 62
    def add_remote(self, dirname, name, url):
63 63
        log.debug("Adding remote %s url: %s", name, url)
64 +
65 +
        if url.startswith("https://") and self.authenticated:
66 +
            url = "git@" + url.removeprefix("https://")
67 +
            url = url.replace("/", ":", 1)
64 68
        self.executor(f"cd {dirname} && git remote add {name} {url}")
65 69
66 70
    def set_up_clone(
Files Coverage
imhotep 88.93%
Project Totals (14 files) 88.93%
412.2
TRAVIS_PYTHON_VERSION=3.10
TRAVIS_OS_NAME=linux
412.1
TRAVIS_PYTHON_VERSION=3.9
TRAVIS_OS_NAME=linux

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading