Summary: | check-webkit-style: Move and rename style-related files into webkitpy/style folder | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Jerdonek <cjerdonek> | ||||
Component: | Tools / Tests | Assignee: | Chris Jerdonek <cjerdonek> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | abarth, cjerdonek, commit-queue, eric, hamaji, levin, webkit.review.bot | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 32973 | ||||||
Attachments: |
|
Description
Chris Jerdonek
2009-12-27 15:56:07 PST
Removed brackets from bug title. Towards creating a style package. We can do this after-- https://bugs.webkit.org/show_bug.cgi?id=32966 Created attachment 45963 [details]
Proposed patch
To reference webkitpy modules outside of webkitpy/style, I settled on the central approach of adding the parent webkitpy directory to the style package's search path in style/__init__.py. This is instead of using absolute or relative import statements throughout the style package.
This comes up, for example, when style/checker.py needs to import diff_parser.DiffParser.
This will minimize us needing to go in an update files in the style package as the folder hierarchy for non-style files changes. Let me know if you have other thoughts.
style-queue ran check-webkit-style on attachment 45963 [details] without any errors.
(In reply to comment #0) > This task includes the following moves/renames: > > style.py -> style/checker.py > style_unittest.py -> style/checker_unittest.py > cpp_style.py -> style/cpp.py > cpp_style_unittest.py -> style/cpp_unittest.py > text_tyle.py -> style/text.py > text_style_unittest.py -> style/text_unittest.py I ended up doing something a bit simpler than this and left cpp_style* and text_style* alone. I only renamed-- > style.py -> style/checker.py > style_unittest.py -> style/checker_unittest.py Comment on attachment 45963 [details]
Proposed patch
Looks sane enough. We can change the __path__ hack to something else if a python guru has a better solution.
Comment on attachment 45963 [details] Proposed patch Clearing flags on attachment: 45963 Committed r52906: <http://trac.webkit.org/changeset/52906> All reviewed patches have been landed. Closing bug. |