-
-
Notifications
You must be signed in to change notification settings - Fork 167
BUG: Allow no . at end if indented #239
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
Conversation
Okay everything works, @datapythonista when you get a chance to look (or know a Pandas person who might want to look) this is ready for review/merge from my end |
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.
Happy with the idea, but I think the implementation would be a bit cleaner if we simply don't join the description in doc_parameters
, and we join it when it's used, except for the cases you implemented that you just care about the last element in the list.
The joining and unjoining, and the new function feels a bit hacky to me.
Also, do you think it makes sense to not just check on the line starting by space, but also by *
and -
, so we don't require the period if the line is a list? We'll have to implement this eventually, and I think your PR almost solves it. I think the condition will be quite complex, and worth having a helper function is_last_line_regular
that implements it.
Agreed, wasn't sure if you had plans for
Sure, I can add those characters |
@datapythonista pushed a commit with simplifications/cleanups/ |
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.
lgtm, nice work
@datapythonista one more -- I took your idea of refactoring a bit further to refactor both |
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.
Good idea. But my preference would be to keep parameter_desc
as it was, and just call it from _check_desc
. I guess we're not testing parameter_desc
, but if we do in the future, will be much easier if every concept is independent. Besides that it may be reused somewhere else in the future.
And to me it'd make things easier to read and understand the code if _check_desc
returns errors that are appended to the errors list (instead of receiving errs
and modifying it).
And for kinds
, instead of the assert I'd simply name them code_no_desc, code_no_upper, code_no_period = kinds
. Will make things easier to read.
All |
Checked it again, and happy with what you did. I didn't check in detail |
Yeah we might want something like this in the future. But for now since you're happy I'll get this in so we can keep moving (without conflicts) as Pandas and hopefully sklearn give it a shot. |
This should be okay:
This PR makes it okay by allowing the description not to end with
.
if the last line is indented.WIP because I'm going to finish going through the
PR06, PR08, PR09, RT04, RT05
errors in MNE-Python and there might be more false alarms.