Angelo Gladding
lahacker.net

dlv5vbq7lzlthol5 4b942a3185b37d00

angelo@lahacker.net

South Pasadena, California, United States currently feels like 84.53°F

Home CodesrcCommits

Bringing all to date

by Angelo Gladding 09CEF88F29CC1A44

Changed Files

--- a/src/api.py

+++ b/src/api.py

     docstring = obj.__doc__     if not docstring:         return "", ""-    return inspect.cleandoc(docstring).partition("\n")[::2]+    return inspect.cleandoc(docstring).partition("\n\n")[::2]   def get_namespace_members(mod):

--- a/src/git.py

+++ b/src/git.py

             args.extend(["--author", author])         if key:             args.append(f"-S{key}")-        details = self.git("commit", "-m", message, *args)-        detail_lines = details.split("\n")-        commit_hash = re.match(r".+ ([\w\d]{7})\]", detail_lines[0]).group(1)-        return commit_hash+        details = self._gitlines("commit", "-m", message, *args)+        short_hash = re.match(r".+ ([\w\d]{7})\]", details[0]).group(1)+        return self.get_commit(short_hash) -    # def get_commit(self, hash):-    #+    def get_commit(self, hash):+        return list(self.log(hash).values())[0]      def fetch_into_bare(self, repository="origin", refspec="master:master"):         self.git("fetch", repository, refspec)
             nonlocal current_hash             if line.startswith("commit "):                 current_hash = line.split()[1]-                entries[current_hash] = {"message": ""}+                entries[current_hash] = {"hash": current_hash, "message": ""}             elif line.startswith("gpg:                using"):                 entries[current_hash]["pubkey"] = line.split()[-1]             elif line.startswith("Author:"):

--- a/src/qc.py

+++ b/src/qc.py

              "cases": collections.defaultdict(collections.OrderedDict)}     for case_tag in suite_tag:         case = dict(case_tag.attrib)+        outcome = {"type": "success"}         try:-            failure = case_tag.getchildren()[0].attrib["message"]-        except (IndexError, KeyError):-            failure = None+            child = case_tag.getchildren()[0]+        except IndexError:+            pass+        else:+            if child.tag == "failure":+                outcome["type"] = "failure"+                outcome["message"] = child.attrib["message"]+                outcome["code"] = child.text+            elif child.tag == "system-out":+                outcome["output"] = child.text         test_identifier = ":".join((case["classname"], case["name"]))-        suite["cases"][case["file"]][test_identifier] = \-            {"line": case["line"], "time": case["time"], "failure": failure}+        details = {"line": case["line"], "time": case["time"],+                   "outcome": outcome}+        suite["cases"][case["file"]][test_identifier] = details     return suite   def _parse_coverage(path="test_coverage.xml"):     coverage_tag = xml.etree.ElementTree.parse(str(path)).getroot()-    root = pathlib.Path(coverage_tag.getchildren()[0].getchildren()[0].text)+    root = pathlib.Path(coverage_tag.getchildren()[1].getchildren()[0].text)     coverage = {}     for _package in coverage_tag.getchildren()[1].getchildren():         for case in _package.getchildren()[0].getchildren():