<commit_before># -*- coding: utf-8 -*-
# Import python libs
import os

# Import third party libs
import yaml
import logging

# Import salt libs
import salt.utils

log = logging.getLogger(__name__)

def shell():
    '''
    Return the default shell to use on this system
    '''
    # Provides:
    #   shell
    return {'shell': os.environ.get('SHELL', '/bin/sh')}


def config():
    '''
    Return the grains set in the grains file
    '''
    if not 'conf_file' in __opts__:
        return {}
    if os.path.isdir(__opts__['conf_file']):
        gfn = os.path.join(
                __opts__['conf_file'],
                'grains'
                )
    else:
        gfn = os.path.join(
                os.path.dirname(__opts__['conf_file']),
                'grains'
                )
    if os.path.isfile(gfn):
        with salt.utils.fopen(gfn, 'rb') as fp_:
            try:<commit_msg>Pylint fix.<commit_after># -*- coding: utf-8 -*-
# Import python libs
import os

# Import third party libs
import yaml
import logging

# Import salt libs
import salt.utils

log = logging.getLogger(__name__)


def shell():
    '''
    Return the default shell to use on this system
    '''
    # Provides:
    #   shell
    return {'shell': os.environ.get('SHELL', '/bin/sh')}


def config():
    '''
    Return the grains set in the grains file
    '''
    if not 'conf_file' in __opts__:
        return {}
    if os.path.isdir(__opts__['conf_file']):
        gfn = os.path.join(
                __opts__['conf_file'],
                'grains'
                )
    else:
        gfn = os.path.join(
                os.path.dirname(__opts__['conf_file']),
                'grains'
                )
    if os.path.isfile(gfn):
        with salt.utils.fopen(gfn, 'rb') as fp_:
            try:
{'fraction_non_alphanumeric': 0.12829131652661063, 'fraction_numerical': 0.0011204481792717086, 'mean_word_length': 1.8259493670886076, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '194363', 'n_tokens_mistral': 587, 'n_tokens_neox': 565, 'n_words': 150}