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
Thanks for raising the issue!
I just checked and this code works:
from pydriller import Repository
for commit in Repository("test-repos/small_repo", only_no_merge=True).traverse_commits():
print(commit.lines)
print(commit.files)
The reason is that the object is inside a context manager, so it will get destroyed after the loop.
I don't see a good solution to this, other than just iterating over the commits rather than putting them in a list.
ishepard
changed the title
access commit.files or commit.lines will get an error: AttributeError: 'NoneType' object has no attribute 'repo'
Saving commits in a list for later access won't give access to stats
Sep 15, 2023
Describe the bug
After upgrade from 2.5 to 2.5.1, the below code will raise exception.
To Reproduce
The below code:
will raise:
OS Version:
no-arch
The text was updated successfully, but these errors were encountered: