launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #11995
[Merge] lp:~jtv/maas/unbreak-maascli-main into lp:maas
Jeroen T. Vermeulen has proposed merging lp:~jtv/maas/unbreak-maascli-main into lp:maas.
Requested reviews:
MAAS Maintainers (maas-maintainers)
For more details, see:
https://code.launchpad.net/~jtv/maas/unbreak-maascli-main/+merge/124363
I asked around about this on #launchpad-dev, and although several people chimed in, I didn't get very much feedback on my solution. I'll be bold then and interpret that as assent.
Jeroen
--
https://code.launchpad.net/~jtv/maas/unbreak-maascli-main/+merge/124363
Your team MAAS Maintainers is requested to review the proposed merge of lp:~jtv/maas/unbreak-maascli-main into lp:maas.
=== modified file 'utilities/format-imports'
--- utilities/format-imports 2012-02-29 10:40:06 +0000
+++ utilities/format-imports 2012-09-14 08:34:38 +0000
@@ -158,7 +158,10 @@
comment_regex = re.compile(
"(?P<comment>(^#.+\n)+)(^import|^from) +(?P<module>[a-zA-Z0-9_.]+)", re.M)
split_regex = re.compile(",\s*")
-module_base_regex = re.compile("([^. ]+)")
+
+# The base part of an import is its leading part: either a series of
+# dots, or a leading identifier.
+module_base_regex = re.compile("([.]+|[^. ]+)")
# Module docstrings are multiline (""") strings that are not indented and are
# followed at some point by an import .
@@ -296,7 +299,7 @@
return imports
LOCAL_PACKAGES = (
- 'canonical', 'lp', 'launchpad_loggerhead', 'devscripts',
+ '.', 'canonical', 'lp', 'launchpad_loggerhead', 'devscripts',
# database/* have some implicit relative imports.
'fti', 'replication', 'preflight', 'security', 'upgrade',
)