Merge lp://staging/~adiroiban/pocket-lint/923309 into lp://staging/pocket-lint

Proposed by Adi Roiban
Status: Merged
Approved by: Curtis Hovey
Approved revision: 448
Merged at revision: 449
Proposed branch: lp://staging/~adiroiban/pocket-lint/923309
Merge into: lp://staging/pocket-lint
Diff against target: 64 lines (+18/-8)
1 file modified
pocketlint/formatcheck.py (+18/-8)
To merge this branch: bzr merge lp://staging/~adiroiban/pocket-lint/923309
Reviewer Review Type Date Requested Status
Curtis Hovey code Approve
Review via email: mp+90618@code.staging.launchpad.net

Description of the change

This is my take on implementing a more flexible pocket-lint for checking line length.

Please let me know if you want this configuration to be implemented in a different way.

Maybe this will require a few lines in the documentation/README

I am currently using it in the following way:

    from pocketlint.formatcheck import (
        BaseChecker,
        check_sources,
        PythonChecker,
        )

    # Patch checkers.
    BaseChecker.check_length_filter = lambda self: 78
    PythonChecker.check_length_filter = lambda self: 78

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

I have already merged your changes in to my branch.

I then factored out the link_length check from the python checker because pep8. pep8 users the check_length_filter to determine if it needs to override the default. I am presently adding a command line arg (--max-length) that will be used by check_length_filter.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: