8000 DOC: Add ignore-deprecate argument to validate_docstrings.py by charlesdong1991 · Pull Request #23650 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

DOC: Add ignore-deprecate argument to validate_docstrings.py #23650

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

Merged
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e1fc4d5
add ignore-deprecate argument and add pytest
charlesdong1991 Nov 12, 2018
a08cb6d
fix flake8
charlesdong1991 Nov 12, 2018
42e372f
correct argument name
charlesdong1991 Nov 12, 2018
e569cf2
code changed based on review
charlesdong1991 Nov 12, 2018
09be5aa
change name and help description
charlesdong1991 Nov 12, 2018
e7a723b
add ignore_deprecated description for functiondocstring
charlesdong1991 Nov 12, 2018
70b0fcb
debug the error
charlesdong1991 Nov 13, 2018
66b9de3
debug the error
charlesdong1991 Nov 13, 2018
f5d28fe
set default value for ignore-deprecated
charlesdong1991 Nov 13, 2018
49188dd
bug fixing
charlesdong1991 Nov 13, 2018
901b943
add positional argument for lambda
charlesdong1991 Nov 13, 2018
c1f44a4
remove wrong lambda
charlesdong1991 Nov 13, 2018
1095a9a
add argument for setattr
charlesdong1991 Nov 13, 2018
26e1d04
correct argument name
charlesdong1991 Nov 13, 2018
b199099
assign true to ignore deprecated
charlesdong1991 Nov 13, 2018
b384e79
debug the error
charlesdong1991 Nov 13, 2018
a0f9d21
correct the assert value
charlesdong1991 Nov 13, 2018
af35c19
modify pytest
charlesdong1991 Nov 13, 2018
f1a66a6
rewrite pytest
charlesdong1991 Nov 13, 2018
79e5706
remove added part to test if the failure caused by my code
charlesdong1991 Nov 14, 2018
83cc28c
put tests back
charlesdong1991 Nov 15, 2018
1ed082a
remove curly bracket position
charlesdong1991 Nov 15, 2018
14e522a
change formatting
charlesdong1991 Nov 15, 2018
2418c0c
remove redunctant default value
charlesdong1991 Nov 15, 2018
f20fee1
set default to False
charlesdong1991 Nov 15, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove curly bracket position
  • Loading branch information
charlesdong1991 committed Nov 15, 2018
commit 1ed082af989e93dda70f2a93c60d07b13e6fab0d
3 changes: 1 addition & 2 deletions scripts/tests/test_validate_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,7 @@ def test_exit_status_for_validate_one(self, monkeypatch):
def test_exit_status_errors_for_validate_all(self, monkeypatch):
monkeypatch.setattr(
validate_docstrings, 'validate_all',
lambda prefix, ignore_deprecated=None:
{
lambda prefix, ignore_deprecated=None: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I didn't see that before... ignore_deprecated expects a boolean value, I don't think we should pass None. And I see that it has a default value of False that is what we want. So, can you restore the original code? I think it should work, right?

Copy link
Member Author
@charlesdong1991 charlesdong1991 Nov 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh, i did this because i thought right now, validate_all takes in two arguments, and although ignore_deprecated has beed set to False by default, when we use lambda to create this mock data, we still need to assign a variable as a kind of placeholder, otherwise, there will be an error raised... can I still keep this, and remove None so that it looks like lambda: prefix, ignore_deprecated , please share your thoughts! And thanks for the quick response! @datapythonista

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, that's right, I checked it fast and didn't see those are the arguments of the mock function, not the parameters being passed. In that case set ignore_deprecated=False, so we have the same signature in the mock as in the mocked function.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, yeah, changed to False! thx for the feedback!

'docstring1': {'errors': [('ER01', 'err desc'),
('ER02', 'err desc'),
('ER03', 'err desc')],
Expand Down
0