Skip to content

LINT: Adding scripts directory to lint, and fixing flake issues on them (#18949) #19344

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 1 commit into from
Jan 24, 2018
Merged

LINT: Adding scripts directory to lint, and fixing flake issues on them (#18949) #19344

merged 1 commit into from
Jan 24, 2018

Conversation

datapythonista
Copy link
Member

@datapythonista datapythonista commented Jan 22, 2018

@pep8speaks
Copy link

pep8speaks commented Jan 22, 2018

Hello @datapythonista! Thanks for updating the PR.

Cheers ! There are no PEP8 issues in this Pull Request. 🍻

Comment last updated on January 23, 2018 at 11:46 Hours UTC


Usage::

$ ./apache-pr-merge.py (see config env vars below)
Copy link
Member

Choose a reason for hiding this comment

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

This must have been copied verbatim, since our file isn't called apache-pr-merge (just pr-merge).

@@ -61,21 +63,25 @@ def add_notes(x):
# class members
class_members = set()
for cls in classes:
class_members.update([cls.__name__ + '.' + x[0] for x in inspect.getmembers(cls)])
class_members.update('%s.%s' % (cls.__name__, x[0])
Copy link
Member

Choose a reason for hiding this comment

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

We're moving away from this string formatting mechanism in favor of named kwargs.

argparser.add_argument('--debug-level',
default="CRITICAL",
help='debug level of messages (DEBUG,INFO,etc...)')

help='debug level of messages (DEBUG,INFO,etc...)')
Copy link
Member

Choose a reason for hiding this comment

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

Add space between "," and "INFO"

@jreback jreback added the Code Style Code style, linting, code_checks label Jan 23, 2018
@datapythonista
Copy link
Member Author

@gfyoung, thanks for your comments, fixed them.

I agree about documenting the scripts, but as you suggest I also think that should go in a separate PR. I think scripts like find_commits_touching_func.py are not being used, and I'm not sure if they're still useful.

Also, I'm thinking in merging find_undoc_args.py and api_rst_coverage.py in a single general script that checks all problems related documentation at once.

And there are others like the ones related to the release, that I'm surely not the best person to describe how to use them. :)

@@ -223,7 +222,7 @@ def update_pr(pr_num, user_login, base_ref):
try:
run_cmd(
'git push -f %s %s:%s' % (push_user_remote, pr_branch_name,
Copy link
Contributor

Choose a reason for hiding this comment

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

separtely, would like to change format strings from % to .format()

@jreback jreback added this to the 0.23.0 milestone Jan 24, 2018
@jreback jreback merged commit 7e429d8 into pandas-dev:master Jan 24, 2018
@jreback
Copy link
Contributor

jreback commented Jan 24, 2018

thanks @datapythonista

also if you can create an issue for #19344 (comment) comments and change % to .format() in scripts would be great. (PR even better!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LINT: pandas/scripts
4 participants