Skip to content

Is None possible for the attribute change_type of git.diff.Diff object? #1696

Answered by Byron
jiseongg asked this question in Q&A
Discussion options

You must be logged in to vote

I looks like change_type is known to possibly be None as per the bolted on type-system. Ideally the editor would know and warn about it, but apparently this didn't happen here.

The actual problem seems to be though that a modified file isn't classified as such - instead, no classification is provided.

Since I don't know why that is, a contributor could probably create a test with reproduction and fix it that way, or at least, understand what's going on.


Instead of trying to fix this, I recommend using gitoxide - it will probably be multiple times faster and doesn't have these typing problems either.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jiseongg
Comment options

Answer selected by Byron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants