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
PR: Removed unused __init__() methods #655
PR: Removed unused __init__() methods #655
Conversation
Question: If the black-related checks passed this branch, why did those same checks pass Answer: recent commits to |
This comment was marked as outdated.
This comment was marked as outdated.
@lieryan There might be a simple explanation:
Just a guess. Anyway, this version of black passes muster on Windows 11: python.exe -m black --version
python -m black, 23.1.0 (compiled: yes)
Python (CPython) 3.10.5 |
|
Committer, author, and pusher are three separate concept in Git. I authored and committed 88e2d68, but you pushed the commit to your fork when you synced your fork with the mainline repository. So the notification seems accurate, albeit a bit confusing if you don't make the distinction. Github Action seems to use its own upstream version of black. It's not surprising that the formatting changes, since rope pins to an older, patched branch of black that handles dedent()-ed string better. I don't think we pinned the GHA black, so some differences over time would be expected there until black merged the dedent branch. I'll look into if there's a way to avoid this issues, maybe by pinning GHA black or something. |
@lieryan Thanks for your comments. I'll continue to use 23.1.0 for now. I see that I'm glad you're on this. GitHub actions remains mysterious to me :-) |
@lieryan Thanks for generalizing this PR to other classes. |
The
_GlobalVisitor
class is an alias of its base class,_ScopeVisitor
.Only
dpo.PyModule.__init__
references_ScopeVisitor
.The reference is:
self.visitor_class = _GlobalVisitor
_GlobalVisitor.__init__
is unnecessary, and is unlikely ever to be necessary.The only "real" diff should be to
rope/base/pyobjectsdef.py
.The spurious diffs should disappear once PR #656 is merged into master and this branch.