You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/cfengine_cli/deptool.py
+33-10Lines changed: 33 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -95,11 +95,15 @@ def __init__(
95
95
log_info=True,
96
96
):
97
97
"""
98
-
Creates an instance of the class for a Git repository in a given path, cloning from GitHub if the path doesn't exist, then configures it and optionally checks out a requested ref (branch or tag). Arguments:
99
-
* `repo_path`: local filesystem path of the Git repository, or of the GitHub repository to clone
98
+
Creates an instance of the class for a Git repository in a given path,
99
+
cloning from GitHub if the path doesn't exist, then configures it and
100
+
optionally checks out a requested ref (branch or tag). Arguments:
101
+
* `repo_path`: local filesystem path of the Git repository, or of the
102
+
GitHub repository to clone
100
103
* `repo_owner`: name of owner of the GitHub repository to clone
101
104
* `repo_name`: name of GitHub repository to clone
102
-
* `checkout_ref`: optional name of ref to checkout. If not provided, a ref from previous work might be left checked out.
105
+
* `checkout_ref`: optional name of ref to checkout. If not provided,
106
+
a ref from previous work might be left checked out.
103
107
"""
104
108
self.repo_path=repo_path
105
109
@@ -128,7 +132,9 @@ def __init__(
128
132
self.checkout(checkout_ref)
129
133
130
134
defrun_command(self, *command, **kwargs):
131
-
"""Runs a git command in the Git repository. Syntactically this function tries to be as close to `subprocess.run` as possible, just adding `"git"` with some extra parameters at the beginning."""
135
+
"""Runs a git command in the Git repository. Syntactically this
136
+
function tries to be as close to `subprocess.run` as possible,
137
+
just adding `"git"` with some extra parameters at the beginning."""
"""Returns a 2D dictionary of dependencies and versions from all refs: `deps_dict[dep][ref] = version`, as well as a dictionary of widths of each column (ref)."""
335
+
"""Returns a 2D dictionary of dependencies and versions from all refs:
336
+
`deps_dict[dep][ref] = version`, as well as a dictionary of widths of
"""Code from bot-tom's `depstable` that processes the README table directly, returning the updated README. The updated README will not contain dependencies that were not in the README beforehand, and will not automatically remove dependencies that no longer exist."""
357
+
"""Code from bot-tom's `depstable` that processes the README table
358
+
directly, returning the updated README. The updated README will not
359
+
contain dependencies that were not in the README beforehand, and
360
+
will not automatically remove dependencies that no longer exist."""
0 commit comments