diff options
| author | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-09-11 14:33:51 +0900 |
|---|---|---|
| committer | Gustaf Lundh <gustaf.lundh@sonymobile.com> | 2012-09-18 09:54:57 +0200 |
| commit | e00aa6b923d28a3c910f85e7726e4ba1d2a9aebd (patch) | |
| tree | 07c848b81c58e5d4a8e34ecae8606ee5fa62679e /subcmds | |
| parent | 86d973d24ec6771504c37eddc535dff8e03c724f (diff) | |
| download | git-repo-e00aa6b923d28a3c910f85e7726e4ba1d2a9aebd.tar.gz | |
Clean up imports
manifest_xml: import `HEAD` and `R_HEADS` from correct module
version: import `HEAD` from correct module
`HEAD` and `R_HEADS` should be imported from the git_refs module,
where they are originally defined, rather than from the project
module.
repo: remove unused import of readline
cherry_pick: import standard modules on separate lines
smartsync: import subcmd modules explicitly from subcmd
Use:
`import re
import sys`
and
`from subcmds.sync import Sync`
Instead of:
`import sys, re`
and
`from sync import Sync`
Change-Id: Ie10dd6832710939634c4f5c86b9ba5a9cd6fc92e
Diffstat (limited to 'subcmds')
| -rw-r--r-- | subcmds/cherry_pick.py | 3 | ||||
| -rw-r--r-- | subcmds/smartsync.py | 2 | ||||
| -rw-r--r-- | subcmds/version.py | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/subcmds/cherry_pick.py b/subcmds/cherry_pick.py index 7890af4d..7a6d4c20 100644 --- a/subcmds/cherry_pick.py +++ b/subcmds/cherry_pick.py | |||
| @@ -13,7 +13,8 @@ | |||
| 13 | # See the License for the specific language governing permissions and | 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. | 14 | # limitations under the License. |
| 15 | 15 | ||
| 16 | import sys, re | 16 | import re |
| 17 | import sys | ||
| 17 | from command import Command | 18 | from command import Command |
| 18 | from git_command import GitCommand | 19 | from git_command import GitCommand |
| 19 | 20 | ||
diff --git a/subcmds/smartsync.py b/subcmds/smartsync.py index 1edbd35b..e164859f 100644 --- a/subcmds/smartsync.py +++ b/subcmds/smartsync.py | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | # See the License for the specific language governing permissions and | 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. | 14 | # limitations under the License. |
| 15 | 15 | ||
| 16 | from sync import Sync | 16 | from subcmds.sync import Sync |
| 17 | 17 | ||
| 18 | class Smartsync(Sync): | 18 | class Smartsync(Sync): |
| 19 | common = True | 19 | common = True |
diff --git a/subcmds/version.py b/subcmds/version.py index 03195f88..243e3676 100644 --- a/subcmds/version.py +++ b/subcmds/version.py | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | import sys | 16 | import sys |
| 17 | from command import Command, MirrorSafeCommand | 17 | from command import Command, MirrorSafeCommand |
| 18 | from git_command import git | 18 | from git_command import git |
| 19 | from project import HEAD | 19 | from git_refs import HEAD |
| 20 | 20 | ||
| 21 | class Version(Command, MirrorSafeCommand): | 21 | class Version(Command, MirrorSafeCommand): |
| 22 | wrapper_version = None | 22 | wrapper_version = None |
