from .run import run


# TODO: This is a bit slow. Look for a faster way to check.
def find_unmerged_branches_in_cwd():
    """Check for unmerged branches in the current repository"""
    _, unmerged_branches = run(['git', 'branch', '-a', '--no-merged', 'master'])
    unmerged_branches = [s.strip()
                         for s in unmerged_branches.split('\n')
                         if s.strip()]
    return unmerged_branches

@@ -266,52 +266,26 @@
     
-unmerged_branches = %5Bs.strip()%0A             
+return %5Bs.strip()%0A
     
@@ -343,29 +343,16 @@
         
-      
-       
 if s.str
@@ -361,33 +361,4 @@
 ()%5D%0A
-    return unmerged_branches%0A

remove a redundant variable in find_unmerged_branches