[Webkit-unassigned] [Bug 107478] Add functions to ChangeLog - parse bug desc/changed functions, delete/prepend entries
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jan 21 15:52:54 PST 2013
https://bugs.webkit.org/show_bug.cgi?id=107478
--- Comment #4 from Eric Seidel <eric at webkit.org> 2013-01-21 15:54:45 PST ---
(From update of attachment 183836)
View in context: https://bugs.webkit.org/attachment.cgi?id=183836&action=review
> Tools/Scripts/webkitpy/common/checkout/changelog.py:167
> + @staticmethod
> + def _parse_touched_functions(text):
I have (perhaps irational) fear of python's static methods. They are hard to mock/use-mocks-from. I'd rather these be at least class methods if not just plain old instance methods.
> Tools/Scripts/webkitpy/common/checkout/changelog.py:171
> + file_match = re.match(ChangeLogEntry.touched_files_regexp, line)
can we call touched_files_regexp.match directly? I thought the compiled regexp's had instance methods? I guess the r'' syntax only gets you a regexp-aware string and not a compiled regexp?
> Tools/Scripts/webkitpy/common/checkout/changelog.py:198
> + self._bug_description = ChangeLogEntry._parse_bug_description(self._contents)
self. will make these easier to mock/test.
> Tools/Scripts/webkitpy/common/checkout/changelog.py:209
> + self._touched_functions = ChangeLogEntry._parse_touched_functions(self._contents)
same self.
> Tools/Scripts/webkitpy/common/checkout/changelog.py:259
> + def bug_description(self):
> + return self._bug_description
I never quite figured out pythons @property syntax, or if it was a good idea, so most of webkitpy uses getters like these. I just need to figure out what official python style/best-practice is some day.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list