Skip to content

Commit

Permalink
Better future and imports
Browse files Browse the repository at this point in the history
  • Loading branch information
kemayo committed Jan 8, 2016
1 parent c4adee0 commit 8dd236a
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 14 deletions.
40 changes: 29 additions & 11 deletions commands.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,35 @@
from __future__ import absolute_import, unicode_literals, print_function, division

"""This module collates the Git commands from the submodule
...it's a python 2 / 3 compatibility workaround, mostly.
"""

from git.core import *
try:
# Python 3
from .git.core import *

from .git.add import *
from .git.annotate import *
from .git.commit import *
from .git.diff import *
from .git.flow import *
from .git.history import *
from .git.repo import *
from .git.stash import *
from .git.status import *
from .git.statusbar import *
except (ImportError, ValueError):
# Python 2
from git.core import *

from git.add import *
from git.annotate import *
from git.commit import *
from git.diff import *
from git.flow import *
from git.history import *
from git.repo import *
from git.stash import *
from git.status import *
from git.statusbar import *
from git.add import *
from git.annotate import *
from git.commit import *
from git.diff import *
from git.flow import *
from git.history import *
from git.repo import *
from git.stash import *
from git.status import *
from git.statusbar import *
3 changes: 1 addition & 2 deletions git/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from __future__ import print_function
from __future__ import absolute_import
from __future__ import absolute_import, unicode_literals, print_function, division

import os
import sublime
Expand Down
2 changes: 2 additions & 0 deletions git/add.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import absolute_import, unicode_literals, print_function, division

import os
import re

Expand Down
2 changes: 2 additions & 0 deletions git/annotate.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import absolute_import, unicode_literals, print_function, division

import tempfile
import re
import os
Expand Down
2 changes: 2 additions & 0 deletions git/commit.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import absolute_import, unicode_literals, print_function, division

import functools
import tempfile
import os
Expand Down
2 changes: 2 additions & 0 deletions git/core.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import absolute_import, unicode_literals, print_function, division

import os
import sublime
import sublime_plugin
Expand Down
2 changes: 2 additions & 0 deletions git/diff.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import absolute_import, unicode_literals, print_function, division

import sublime
import sublime_plugin
import os
Expand Down
2 changes: 2 additions & 0 deletions git/flow.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import absolute_import, unicode_literals, print_function, division

import sublime
from . import GitWindowCommand

Expand Down
4 changes: 3 additions & 1 deletion git/history.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import sublime_plugin
from __future__ import absolute_import, unicode_literals, print_function, division

import functools
import re

import sublime
import sublime_plugin
from . import GitTextCommand, GitWindowCommand, plugin_file


Expand Down
2 changes: 2 additions & 0 deletions git/repo.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import absolute_import, unicode_literals, print_function, division

import os

import sublime
Expand Down
2 changes: 2 additions & 0 deletions git/stash.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import absolute_import, unicode_literals, print_function, division

from . import GitWindowCommand


Expand Down
2 changes: 2 additions & 0 deletions git/status.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import absolute_import, unicode_literals, print_function, division

import os
import re

Expand Down
2 changes: 2 additions & 0 deletions git/statusbar.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import absolute_import, unicode_literals, print_function, division

import re

import sublime
Expand Down

0 comments on commit 8dd236a

Please sign in to comment.