Bug 68850 - watchlist: Add parsing for definition section.
Summary: watchlist: Add parsing for definition section.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Levin
URL:
Keywords:
Depends on:
Blocks: 68822
  Show dependency treegraph
 
Reported: 2011-09-26 16:49 PDT by David Levin
Modified: 2011-09-26 17:02 PDT (History)
2 users (show)

See Also:


Attachments
Patch (5.21 KB, patch)
2011-09-26 16:50 PDT, David Levin
abarth: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Levin 2011-09-26 16:49:26 PDT
See summary.
Comment 1 David Levin 2011-09-26 16:50:31 PDT
Created attachment 108756 [details]
Patch
Comment 2 Eric Seidel (no email) 2011-09-26 16:52:11 PDT
Comment on attachment 108756 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=108756&action=review

> Tools/Scripts/webkitpy/common/watchlist/watchlistparser.py:41
> +def _parse_definition_section(definition_section, watch_list):

You'll want these on an object, eventually.  Even if that object is a singleton. That way it's easier to mock later.
Comment 3 Adam Barth 2011-09-26 16:53:24 PDT
Comment on attachment 108756 [details]
Patch

I think PEP8 requires all top-level definitions to have two blank lines between them.
Comment 4 David Levin 2011-09-26 17:02:53 PDT
Committed as http://trac.webkit.org/changeset/96046

(In reply to comment #3)
> (From update of attachment 108756 [details])
> I think PEP8 requires all top-level definitions to have two blank lines between them.

Fixed for _eval_watch_list but not for the data structure definitions. fwiw PEP8 seems to not include them: "Separate top-level function and class definitions with two blank lines." and it would seem to introduce a lot of space to put in 2 blank lines around every top level data structure (dictionary, string, etc.)

(In reply to comment #2)
> (From update of attachment 108756 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=108756&action=review
>
> You'll want these on an object, eventually.  Even if that object is a singleton. That way it's easier to mock later.

Ok, I'll consider that for the next patch. I have to think about this.