Skip to content
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

Add new CLI options for skipping a number of lines at the beginning and end of a file from being checked #143

wants to merge 4 commits into from


Copy link

@pizen pizen commented Dec 12, 2012

I work with lots of Python code that resides in files where there is non-Python header and footer information in the files that is necessary for the larger system. These header and footer lines throw the pep8 checker off so I've added these CLI options that allow these lines to be ignored during the check. If the check is being run against a directory these options apply to all files found and checked.

New options:
Prevents the first n lines of the file from being run through the checker. The line numbers are unaffected. If n=2 and there is an error on line 3 of the file pep8 will still report the error as being on line 3.

Prevents the last n lines of the file from being run through the checker.

Copy link

@glarrain glarrain commented Dec 12, 2012

Great contribution! +1

Copy link

@florentx florentx commented Dec 22, 2012

Most users will not need this feature. I prefer to keep it out of the core library.

However I re-used your proposal as an example for advanced usage:

Thank you.

@florentx florentx closed this Dec 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants