This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""Clean up the git branches by removing branches whose change-id got merged.""" | |
from __future__ import unicode_literals | |
import argparse | |
import collections | |
import itertools | |
import json | |
import re |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_dubious_concat(src): | |
"""Check for suspicious string literal concatenation. | |
We will warn about instances of string literal concatenation in list-like | |
contexts - that is, where concatenated string literals are adjacent to | |
commas or inside square brackets. | |
Such a heuristic will catch instances like this:: | |
foo = [ |