<commit_before># -*- coding: utf-8 -*-
"""astyle plugin for zazu"""
import zazu.styler
import zazu.util

__author__ = "<NAME>"
__copyright__ = "Copyright 2017"


class AstyleStyler(zazu.styler.Styler):
    """Astyle plugin for code styling"""

    def style_file(self, file, verbose, dry_run):
        """Run astyle on a file"""
        args = ['astyle', '-v'] + self.options
        if dry_run:
            args.append('--dry-run')
        args.append(file)
        output = zazu.util.check_output(args)
        fix_needed = not output.startswith('Formatted  ')
        return file, fix_needed

    @staticmethod
    def default_extensions():
        return ['*.c',
                '*.cc',
                '*.cpp',
                '*.h',
                '*.hpp',
                '*.java']

    @staticmethod
    def type():<commit_msg>Fix astyle<commit_after># -*- coding: utf-8 -*-
"""astyle plugin for zazu"""
import zazu.styler
import zazu.util

__author__ = "<NAME>"
__copyright__ = "Copyright 2017"


class AstyleStyler(zazu.styler.Styler):
    """Astyle plugin for code styling"""

    def style_file(self, file, verbose, dry_run):
        """Run astyle on a file"""
        args = ['astyle', '-v'] + self.options
        if dry_run:
            args.append('--dry-run')
        args.append(file)
        output = zazu.util.check_output(args)
        fix_needed = output.startswith('Formatted  ')
        return file, fix_needed

    @staticmethod
    def default_extensions():
        return ['*.c',
                '*.cc',
                '*.cpp',
                '*.h',
                '*.hpp',
                '*.java']

    @staticmethod
    def type():
{'fraction_non_alphanumeric': 0.15015015015015015, 'fraction_numerical': 0.006006006006006006, 'mean_word_length': 1.9486725663716815, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1981264', 'n_tokens_mistral': 542, 'n_tokens_neox': 501, 'n_words': 123}