Bug 68850

Summary: watchlist: Add parsing for definition section.
Product: WebKit Reporter: David Levin <levin>
Component: Tools / TestsAssignee: David Levin <levin>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 68822    
Attachments:
Description Flags
Patch abarth: review+

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.