Skip to content

Commit

Permalink
Other: fix indentations and add build_systems
Browse files Browse the repository at this point in the history
  • Loading branch information
randy3k committed Aug 20, 2017
1 parent b1d07eb commit 3c9639c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 29 deletions.
52 changes: 27 additions & 25 deletions GitSavvy.sublime-project
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
{
"folders":
[
{
"path": ".",
"folder_exclude_patterns":[
".git",
"__pycache__"
],
}
],
"SublimeLinter":{
"linters":{
"pep8": {
"ignore": "E401",
// E401 multiple imports on one line
"max-line-length": 120
"folders": [
{
"path": ".",
"folder_exclude_patterns": [
".git",
"__pycache__"
]
}
}
],
"SublimeLinter":{
"linters":{
"pep8": {
"ignore": "E401",
// E401 multiple imports on one line
"max-line-length": 120
}
}
},
"settings": {
"rulers": [100],
"tab_size": 4,
"translate_tabs_to_spaces": true
},
"settings":
{
"rulers":
"build_systems":
[
100
],
"tab_size": 4,
"translate_tabs_to_spaces": true
}
{
"name": "Reload GitSavvy",
"target": "gs_reload_modules_debug"
}
]
}
4 changes: 2 additions & 2 deletions core/git_mixins/active_branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def _get_branch_status_components(self):

valid_punctuation = "".join(c for c in string.punctuation if c not in "~^:?*[\\")
branch_pattern = "[A-Za-z0-9" + re.escape(valid_punctuation) + "\u263a-\U0001f645]+?"
branch_sufix = "( \[((ahead (\d+))(, )?)?(behind (\d+))?(gone)?\])?)"
short_status_pattern = "## (" + branch_pattern + ")(\.\.\.(" + branch_pattern + ")" + branch_sufix + "?$"
branch_suffix = "( \[((ahead (\d+))(, )?)?(behind (\d+))?(gone)?\])?)"
short_status_pattern = "## (" + branch_pattern + ")(\.\.\.(" + branch_pattern + ")" + branch_suffix + "?$"
status_match = re.match(short_status_pattern, first_line)

if not status_match:
Expand Down
4 changes: 2 additions & 2 deletions core/git_mixins/branches.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def _parse_branch_line(self, line):
if not line:
return None

branch = "([a-zA-Z0-9\-\_\/\.\-\u263a-\U0001f645]+(?<!\.lock)(?<!\/)(?<!\.))"
pattern = r"(\* )?(remotes/)?" + branch + " +([0-9a-f]{40}) (\[([a-zA-Z0-9\-\_\/\.]+)(: ([^\]]+))?\] )?(.*)"
branch = r"([a-zA-Z0-9\-\_\/\.\-\u263a-\U0001f645]+(?<!\.lock)(?<!\/)(?<!\.))"
pattern = r"(\* )?(remotes/)?" + branch + r" +([0-9a-f]{40}) (\[([a-zA-Z0-9\-\_\/\.]+)(: ([^\]]+))?\] )?(.*)"

match = re.match(pattern, line)
if not match:
Expand Down

0 comments on commit 3c9639c

Please sign in to comment.