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
Formatted code to closer match PEP8 and removed object
inheritance.
#22449
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). Recognized GitHub usernameWe couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames: This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
PEP8 only changes pollute git history and are not generally merged. There are a lot of places where object is inherited from so I am not sure of removing them all in a module is worthy enough. |
I can remove them all for all modules if you want? :) |
I'm sorry, but we don't accept formatting only changes in general. |
@mattclarke sorry your first PR was a style change! you’re not the first one to have this idea, we know it comes from a good intention, but the CPython project doesn’t take these kind of aesthetic-only changes
I hope this explains why your PR was not accepted, and that if you want to make a contribution you are welcome! Here’s the guide: https://devguide.python.org/ |
@@ -103,7 +103,7 @@ def insertBefore(self, newChild, refChild): | |||
newChild.nextSibling = refChild | |||
refChild.previousSibling = newChild | |||
if index: | |||
node = self.childNodes[index-1] | |||
node = self.childNodes[index - 1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not PEP 8, makes code worse
__slots__ = ('_name', '_value', 'namespaceURI', | ||
'_prefix', 'childNodes', '_localName', 'ownerDocument', | ||
'ownerElement') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad wrapping.
@@ -148,7 +148,7 @@ def replaceChild(self, newChild, oldChild): | |||
newChild.parentNode = self | |||
oldChild.parentNode = None | |||
if (newChild.nodeType in _nodeTypes_with_children | |||
or oldChild.nodeType in _nodeTypes_with_children): | |||
or oldChild.nodeType in _nodeTypes_with_children): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong change; see section on newline before/after binary operator.
There are several other similarly wrong changes.
'_attrsNS', | ||
'nextSibling', 'previousSibling') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More bad wrapping.
Fixed some formatting where it didn't agree with PEP8.
Also, removed instances of inheriting from
object
.