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

Blame returns str not list #1008

Closed
ncopiy opened this issue Apr 25, 2020 · 1 comment
Closed

Blame returns str not list #1008

ncopiy opened this issue Apr 25, 2020 · 1 comment
Labels
Q&A

Comments

@ncopiy
Copy link

@ncopiy ncopiy commented Apr 25, 2020

Version 3.1.1

The docs says it will be list type of return value: https://gitpython.readthedocs.io/en/stable/reference.html?highlight=blame#git.repo.base.Repo.blame

But instead of it i've got a string:

In[2]: from git import Repo
In[3]: from django.conf import settings
In[4]: r = Repo(settings.BASE_DIR)
In[5]: bl = r.git.blame('HEAD', 'users/utils.py')
In[6]: type(bl)
Out[6]: str

Version is similar as in the docs.

(venv) a@a:~/Workspace/git_test$ pip freeze | grep Git
GitPython==3.1.1

Is that incorrect docs or bug in the library?

@Byron Byron added the Q&A label Apr 25, 2020
@Byron
Copy link
Member

@Byron Byron commented Apr 25, 2020

Instead of r.git.blame('HEAD', 'users/utils.py'), you could try r.blame('HEAD', 'users/utils.py').

I hope this helps. Please feel free to continue posting in the closed issue.

@Byron Byron closed this Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.