-
-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Fix and PEP8 #633
[WIP] Fix and PEP8 #633
Conversation
Please split out unrelated changes, e.g. separate pull requests for separate bug fixes. That way, they can land independently. Please refrain from making changes without obvious benefits; e.g. renaming arguments in public functions; they can break upstream users. |
dulwich/porcelain.py
Outdated
:param outstream: Output stream (defaults to stdout) | ||
:param errstream: Error stream (defaults to stderr) | ||
:param repo: Path of repository or repo object for which to generate an archive. | ||
:param commit_id: Commit SHA1 or ref to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name committish ish intentional; it's the term Git uses itself, and it can be either a commit id or a ref name.
dulwich/porcelain.py
Outdated
|
||
|
||
def print_tag(tag, decode, outstream=sys.stdout): | ||
def print_tag(tag: Tag, decode: Callable[[bytes], str], out_stream=default_bytes_out_stream): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of sys.stdout is intentional here, since defaults_bytes_out_stream doesn't support writing native strings on Python 3.
dulwich/porcelain.py
Outdated
@@ -608,39 +631,41 @@ def show(repo=".", objects=None, outstream=sys.stdout, | |||
if not isinstance(objects, list): | |||
objects = [objects] | |||
with open_repo_closing(repo) as r: | |||
for objectish in objects: | |||
o = parse_object(r, objectish) | |||
for object_id in objects: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above; the use of the term objectish is intentional here.
dulwich/porcelain.py
Outdated
:param mode: Mode ("hard", "soft", "mixed") | ||
:param treeish: Treeish to reset to | ||
:param tree_id: Tree id to reset to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of the term "treeish" is intentional here.
CONTEXT
#631
This PR is comprised of:
EDIT: forgot dulwich is compatible with
shittylame python2, will need to change typing; also had wrong line length, will update that too