<commit_before>import json
import os
import logging

logger = logging.getLogger(__name__)

HERE = os.path.dirname(os.path.realpath(__file__))

groups = json.load(open('{0}/defaults.json'.format(HERE)))
fp = None
try:
    fp = open('{0}/local.json'.format(HERE))
except IOError:
    logger.info('No local.json found to populate lists of DraftRegistrationApproval authorizers.')
if fp:
    for group, members in json.load(fp).iteritems():
        if group not in groups:
            groups[group] = members
        else:
            groups[group] = set(groups[group]) | set(members)

def members_for(group):
    global_members = set(groups['global'])
    return global_members | set(groups.get(group, []))<commit_msg>Close file pointer after opening<commit_after>import json
import os
import logging

logger = logging.getLogger(__name__)

HERE = os.path.dirname(os.path.realpath(__file__))

groups = json.load(
    open(
        os.path.join(HERE, 'defaults.json')
    )
)
fp = None
try:
    fp = open('{0}/local.json'.format(HERE))
except IOError:
    logger.info('No local.json found to populate lists of DraftRegistrationApproval authorizers.')
if fp:
    for group, members in json.load(fp).iteritems():
        if group not in groups:
            groups[group] = members
        else:
            groups[group] = set(groups[group]) | set(members)
    fp.close()

def members_for(group):
    global_members = set(groups['global'])
    return global_members | set(groups.get(group, []))
{'fraction_non_alphanumeric': 0.1304640215198386, 'fraction_numerical': 0.0020174848688634837, 'mean_word_length': 3.62111801242236, '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': '5210150', 'n_tokens_mistral': 458, 'n_tokens_neox': 459, 'n_words': 114}