-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Breaking down C0111(Missing Docstring) into multiple "Convention" messages #2036
Conversation
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.
This is a great change. I love the idea!
It's not something to address in this pull request, but perhaps in the future we can split out an extra message for magic methods and another for nested classes or functions. I think there will be times that people will want to turn those messages off especially, but still get messages for everything else.
I've made a few small comments but there's nothing major. It would be great to get them fixed before merging but it's not a problem if they don't get fixed.
Also the tests should now be fixed so hopefully they'll pass if you make a change to this pull request.
Following the review of pull-request pylint-dev#2036 by Ashley Whetter. See pylint-dev#2036
@AWhetter thank you for reviewing and approving the changes. I fixed the spelling in the github interface. I coded that a long time ago and had the same reflexion than you when seeing the "ime" naming, it definitely needs a refactor. So I'll make the other change too, but only when I have an IDE and git available. Regarding the tests, they're not passing because the refactor required in order to have multiple old messages with the same name is not done yet :) |
Following the review of pull-request pylint-dev#2036 by Ashley Whetter. See pylint-dev#2036
to _raise_duplicate_symbol and _raise_duplicate_msg_id Following the review of pull-request pylint-dev#2036 by Ashley Whetter.
Following the review of pull-request pylint-dev#2036 by Ashley Whetter.
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.
Thanks @Pierre-Sassoulas This looks great! I left a couple of small comments, but nothing that's related to the logic, which looks straightforward. Also if you can, please also add a description in the What's New
document for this release, 2.0
rst, which can go a bit more in depth on what we did here (split the missing-docstring
, mention the fact that the old disable/enable can still work with missing-docstring
and mention the new added messages`
There is a function, called "MessageStore.check_message_id(msgid)" (~= line 850 in utils.py). It is used outside of MessageStore a dozen of times. It return a MessageDefinition instance when you give a msgid and raise an error if there is no corresponding message for the msgid. It does not check anything. So I think it should actually be called "get_message_from_msgid(msgid)". Can I refactore this or did I miss something? |
From the sound of it, you can refactor it, but let's do it in a separate PR
…On Wed, May 9, 2018, 09:54 Pierre Sassoulas ***@***.***> wrote:
There is a function, called "MessageStore.check_message_id(msgid)" (~=
line 850). It is used outside of MessageStore a dozen of times. It return a
MessageDefinition instance when you give a msgid and raise an error if
there is no corresponding message for the msgid. It does not check
anything. So I think it should actually be called
"get_message_from_msgid(msgid)". Can I refactore this or did I miss
something?
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#2036 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAbWpiv3xkbCwVrmBga8sG-6lxWa5ZXHks5twvUBgaJpZM4Tha9_>
.
|
Create a function to get message definitions list from a checker. Create a function for checking checker consistency Create a function in order to register a MessageDefinition Corrected following the review of pull-request pylint-dev#2036 by Ashley Whetter and PCManticore.
Use of f-strings in Python 3. Updated the docstrings with spinx syntax. Rename variable to be clearer and use @staticmethoc when possible. Following review of pylint-dev#2036
Create a function to get message definitions list from a checker. Create a function for checking checker consistency Create a function in order to register a MessageDefinition Corrected following the review of pull-request pylint-dev#2036 by Ashley Whetter and PCManticore.
Use of f-strings in Python 3. Updated the docstrings with spinx syntax. Rename variable to be clearer and use @staticmethoc when possible. Following review of pylint-dev#2036
Create a function to get message definitions list from a checker. Create a function for checking checker consistency Create a function in order to register a MessageDefinition Corrected following the review of pull-request #2036 by Ashley Whetter and PCManticore.
Use of f-strings in Python 3. Updated the docstrings with spinx syntax. Rename variable to be clearer and use @staticmethoc when possible. Following review of #2036
Fixed spelling in C0112 to C0116 messages following the review of pull-request pylint-dev#2036 by Ashley Whetter.
Regarding the refactor in MessageStore. Let's take an example :
Right now this raises an error and what I think is stored in MessagesStore is this:
I have a feeling that we could construct a message for the old name and link it for every child symbol/msgid :
But I don't know how to construct the mother message for W1234 in this case. Do we take W1235 message definition ? W1236 ? Something new ? So the other way would be to make a (very big?) refactor to permit MessagesStore to return a list of message definitions :
Or maybe a list only if its an alternate name :
Any thoughts @PCManticore ? |
Fixed spelling in C0112 to C0116 messages following the review of pull-request pylint-dev#2036 by Ashley Whetter.
Fixed spelling in C0112 to C0116 messages following the review of pull-request pylint-dev#2036 by Ashley Whetter.
Fixed spelling in C0112 to C0116 messages following the review of pull-request pylint-dev#2036 by Ashley Whetter.
606ad71
to
f1bbf64
Compare
Also fixed spelling in C0112 to C0116 messages following the review of pull-request pylint-dev#2036 by Ashley Whetter. See also pylint-dev#2075, pylint-dev#2077, pylint-dev#2262, pylint-dev#2654, pylint-dev#2805, pylint-dev#2809, pylint-dev#2844, pylint-dev#2992 and pylint-dev#3013 for full historical context.
@PCManticore This is ready for review but everything will be easier if we first resolve the smaller chunks. This MR is based upon #3021, #3041, #2992, and #3013, let's merge them first (in this order). |
2 similar comments
f1bbf64
to
a91bcd2
Compare
Also fixed spelling in C0112 to C0116 messages following the review of pull-request pylint-dev#2036 by Ashley Whetter. See also pylint-dev#2075, pylint-dev#2077, pylint-dev#2262, pylint-dev#2654, pylint-dev#2805, pylint-dev#2809, pylint-dev#2844, pylint-dev#2992 and pylint-dev#3013 for full historical context.
a91bcd2
to
9db2b94
Compare
Also fixed spelling in C0112 to C0116 messages following the review of pull-request pylint-dev#2036 by Ashley Whetter. See also pylint-dev#2075, pylint-dev#2077, pylint-dev#2262, pylint-dev#2654, pylint-dev#2805, pylint-dev#2809, pylint-dev#2844, pylint-dev#2992 and pylint-dev#3013 for full historical context.
9db2b94
to
beccba8
Compare
Also fixed spelling in C0112 to C0116 messages following the review of pull-request pylint-dev#2036 by Ashley Whetter. See also pylint-dev#2075, pylint-dev#2077, pylint-dev#2262, pylint-dev#2654, pylint-dev#2805, pylint-dev#2809, pylint-dev#2844, pylint-dev#2992 and pylint-dev#3013 for full historical context.
We need to make sure the change do not break existing code.
beccba8
to
44fbb52
Compare
@PCManticore this is the final merge request for #1164. In hindsight it looks like I could have chosen an easier first issue :) |
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.
@Pierre-Sassoulas Alright, this is ready! Thank you so much for the effort you put into getting this change in. 🙇 It took a tremendous amount of effort and refactoring to get to this point, and I appreciate your work and enthusiasm in making these three separate checks a reality.
Output text for missing function/module docstring was modified here: pylint-dev/pylint#2036 Update this test to handle it.
Output text for missing function/module docstring was modified here: pylint-dev/pylint#2036 Update this test to handle it.
This is an incomplete pull request in order to see more easily what needs to be changed in order to implement #1164 after a long period of inactivity.