Flagged by both pytype and VSCode.
Details
- Reviewers
dlax - Group Reviewers
hg-reviewers - Commits
- rHGd5ce99a6db52: filemerge: fix a missing attribute usage
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
mercurial/filemerge.py | ||
---|---|---|
122 | What about fctx? It could also lack the ctx() method if an instance of absentfilectx. |
mercurial/filemerge.py | ||
---|---|---|
122 | I’m not sure how this works, but this was enough to make pytype happy. Does it make any sense to compare an absent file to an absent file? Maybe the right thing is to add a ctx attribute here? |
mercurial/filemerge.py | ||
---|---|---|
122 |
Not sure, but due to lazy evaluation fctx.ctx() == self.ctx() would only be evaluated if fctx is an absent file, hence also lacking the ctx() method. |
What about fctx? It could also lack the ctx() method if an instance of absentfilectx.
I wonder if the intent was not fctx.changectx() == self.changectx().