Skip to content
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

Closed
wants to merge 0 commits into from
Closed

[WIP] Fix and PEP8 #633

wants to merge 0 commits into from

Conversation

r0mainK
Copy link
Contributor

@r0mainK r0mainK commented Jun 13, 2018

CONTEXT

#631

This PR is comprised of:

  • pep8 and typing for porcelain - cuz why not
  • two bug fixes, described in the issue

EDIT: forgot dulwich is compatible with shitty lame python2, will need to change typing; also had wrong line length, will update that too

@r0mainK r0mainK changed the title Fix and PEP8 [WIP] Fix and PEP8 Jun 13, 2018
@jelmer
Copy link
Owner

jelmer commented Jun 13, 2018

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.

: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
Copy link
Owner

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.



def print_tag(tag, decode, outstream=sys.stdout):
def print_tag(tag: Tag, decode: Callable[[bytes], str], out_stream=default_bytes_out_stream):
Copy link
Owner

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.

@@ -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:
Copy link
Owner

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.

:param mode: Mode ("hard", "soft", "mixed")
:param treeish: Treeish to reset to
:param tree_id: Tree id to reset to
Copy link
Owner

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.

@r0mainK
Copy link
Contributor Author

r0mainK commented Jun 14, 2018

@jelmer put the fixes here and there I will modify this to simply add some porcelain errors

@jelmer jelmer added the WIP label Jun 15, 2018
@r0mainK r0mainK closed this Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants