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 deprecation warning for pep8 'plugin' in pythonstyle suppress file #5888

merged 1 commit into from May 31, 2018


None yet
2 participants
Copy link

cheister commented May 31, 2018


In #5867 pep8 was deprecated in favor pycodestyle but using "pep8" in the suppression file was not deprecated


Log a warning when pep8 is seen in the suppression file and change it to pycodestyle


We have a deprecation message for pep8 usage in the suppression file that still works with pycodestyle.

@cheister cheister requested a review from stuhood May 31, 2018

Copy link

stuhood left a comment

Thanks a lot!

@@ -23,6 +23,11 @@ def __init__(self, excludes_path, log):
pattern, plugins = line.strip().split('::', 2)
plugins = plugins.split()

# Remove this in 1.10.0.dev0 when the `pycheck-pep8` is removed in
if 'pep8' in plugins:
log.warn("The pep8 check has been renamed to pycodestyle, please update your suppression file: {}".format(excludes_path))

This comment has been minimized.


stuhood May 31, 2018


Can use deprecated_conditional to do this:

lambda: len(target_types) > 1,
'TargetMacro.Factory instances that construct more than one type are no longer supported. '
'Consider using a `context_aware_object_factory, which can construct any number of '
'different objects.'

@cheister cheister force-pushed the cheister:deprecate-pep8-suppression-file branch from 8b28d3f to 600a71f May 31, 2018

@cheister cheister merged commit a4e18fe into pantsbuild:master May 31, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

@cheister cheister deleted the cheister:deprecate-pep8-suppression-file branch May 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment