<commit_before>from robot.libraries.BuiltIn import BuiltIn
from .PageObjects import PageObjects  # noqa: F401
from .baseobjects import BasePage, ListingPage, HomePage, DetailPage  # noqa: F401


def pageobject(page_type, object_name=None):
    """A decorator to designate a class as a page object"""
    BuiltIn().log("importing page object {} {}".format(page_type, object_name), "DEBUG")

    def wrapper(cls):
        key = (page_type, object_name)
        PageObjects.registry[key] = cls
        if not hasattr(cls, "_object_name"):
            cls._object_name = object_name
        return cls
<commit_msg>fix minor bug in pageobjects/__init__ This if block wasn't executing the class defined _object_name as None, but it should.<commit_after>from robot.libraries.BuiltIn import BuiltIn
from .PageObjects import PageObjects  # noqa: F401
from .baseobjects import BasePage, ListingPage, HomePage, DetailPage  # noqa: F401


def pageobject(page_type, object_name=None):
    """A decorator to designate a class as a page object"""
    BuiltIn().log("importing page object {} {}".format(page_type, object_name), "DEBUG")

    def wrapper(cls):
        key = (page_type, object_name)
        PageObjects.registry[key] = cls
        if getattr(cls, "_object_name", None) is None:
            cls._object_name = object_name
        return cls

{'fraction_non_alphanumeric': 0.0962686567164179, 'fraction_numerical': 0.008955223880597015, 'mean_word_length': 3.806451612903226, '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': '6639589', 'n_tokens_mistral': 407, 'n_tokens_neox': 395, 'n_words': 126}