bfd61fb7a0c4456ce812a227f3b1962b2c727879,bears/general/KeywordBear.py,KeywordBear,run,#KeywordBear#,14

Before Change


        """
        results = list()

        for i in range(len(keywords)):
            keywords[i] = keywords[i].lower()

        for line_number, line in enumerate(file):
            for keyword in keywords:
                results += self.check_line_for_keyword(line.lower(),
                                                       filename,

After Change


            A list of keywords to search for (case insensitive).
            Usual examples are TODO and FIXME.
        """
        keywords_regex = re.compile(
            "(" + "|".join(re.escape(key) for key in keywords) + ")",
            re.IGNORECASE)

        for line_number, line in enumerate(file):
            for keyword in keywords_regex.finditer(line):
                yield Result.from_values(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: coala/coala-bears
Commit Name: bfd61fb7a0c4456ce812a227f3b1962b2c727879
Time: 2016-09-03
Author: abdealikothari@gmail.com
File Name: bears/general/KeywordBear.py
Class Name: KeywordBear
Method Name: run


Project Name: alexandrebarachant/pyRiemann
Commit Name: b45f35862afbca09ff1c70be1cc4d1d6ca6c9617
Time: 2015-07-03
Author: alexandre.barachant@gmail.com
File Name: pyriemann/classification.py
Class Name: MDM
Method Name: _predict_distances


Project Name: ilastik/ilastik
Commit Name: 558f030de16f0e3ea4ce860aac0d085faad99441
Time: 2019-08-13
Author: k-dominik@users.noreply.github.com
File Name: ilastik/applets/batchProcessing/batchProcessingGui.py
Class Name: BatchProcessingGui
Method Name: run_export