<commit_before># Copyright (c) 2009-2021 The Regents of the University of Michigan
# This file is part of the HOOMD-blue project, released under the BSD 3-Clause
# License.

"""Base classes for all HOOMD-blue operations."""

# Operation is a parent class of almost all other HOOMD objects.
# Triggered objects should inherit from _TriggeredOperation.

from copy import copy

from hoomd.trigger import Trigger
from hoomd.logging import Loggable
from hoomd.data.parameterdicts import ParameterDict
from hoomd.error import MutabilityError

class _HOOMDGetSetAttrBase:
    """Provides the use of `ParameterDicts` and `TypeParameterDicts` as attrs.

    Provides many hooks for varying behavior.

    Attributes:
        _reserved_default_attrs (dict[str, Callable([], T)]): Attributes that
            have defaults and should be set using `object.__setattr__`. Has
            `_param_dict` and `_typeparam_dict` keys by default.
        _override_setattr (set[str]): Attributes that should not use the
            provided `__setattr__`. `super().__setattr__` is called for them.
            Likely, this wil no longer be necessary when triggers are added to
            C++ Updaters and Analyzers.
        _param_dict (ParameterDict): The `ParameterDict` for the class/instance.
        _typeparam_dict (dict[str, TypeParameter]): A dict of all the
            TypeParameters for the class/instance.
    """
    _reserved_default_attrs = dict(_param_dict=ParameterDict,
                                   _typeparam_dict=dict)
    _override_setattr = set()
    print('class')
    def __getattr__(self, attr):
        if attr in self._reserved_default_attrs.keys():
            default = self._reserved_default_attrs[attr]
            value = default() if callable(default) else default
            object.__setattr__(self, attr, value)
            return value
        elif attr in self._param_dict.keys():
            return self._getattr_param(attr)
        elif attr in self._typeparam_dict.keys():
            return self._getattr_typeparam(attr)
        else:
            raise AttributeError("Object {} has no attribute {}".format(
                type(self), attr))<commit_msg>Delete temporary print() statements<commit_after># Copyright (c) 2009-2021 The Regents of the University of Michigan
# This file is part of the HOOMD-blue project, released under the BSD 3-Clause
# License.

"""Base classes for all HOOMD-blue operations."""

# Operation is a parent class of almost all other HOOMD objects.
# Triggered objects should inherit from _TriggeredOperation.

from copy import copy

from hoomd.trigger import Trigger
from hoomd.logging import Loggable
from hoomd.data.parameterdicts import ParameterDict
from hoomd.error import MutabilityError

class _HOOMDGetSetAttrBase:
    """Provides the use of `ParameterDicts` and `TypeParameterDicts` as attrs.

    Provides many hooks for varying behavior.

    Attributes:
        _reserved_default_attrs (dict[str, Callable([], T)]): Attributes that
            have defaults and should be set using `object.__setattr__`. Has
            `_param_dict` and `_typeparam_dict` keys by default.
        _override_setattr (set[str]): Attributes that should not use the
            provided `__setattr__`. `super().__setattr__` is called for them.
            Likely, this wil no longer be necessary when triggers are added to
            C++ Updaters and Analyzers.
        _param_dict (ParameterDict): The `ParameterDict` for the class/instance.
        _typeparam_dict (dict[str, TypeParameter]): A dict of all the
            TypeParameters for the class/instance.
    """
    _reserved_default_attrs = dict(_param_dict=ParameterDict,
                                   _typeparam_dict=dict)
    _override_setattr = set()
    def __getattr__(self, attr):
        if attr in self._reserved_default_attrs.keys():
            default = self._reserved_default_attrs[attr]
            value = default() if callable(default) else default
            object.__setattr__(self, attr, value)
            return value
        elif attr in self._param_dict.keys():
            return self._getattr_param(attr)
        elif attr in self._typeparam_dict.keys():
            return self._getattr_typeparam(attr)
        else:
            raise AttributeError("Object {} has no attribute {}".format(
                type(self), attr))
{'fraction_non_alphanumeric': 0.0746166170748455, 'fraction_numerical': 0.004119935912108034, 'mean_word_length': 2.905272564789991, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4509017', 'n_tokens_mistral': 1195, 'n_tokens_neox': 1158, 'n_words': 409}