<commit_before>from dli_app import db, login_manager

@login_manager.user_loader
def user_loader(user_id):
    return User.query.get(user_id)

class User(db.Model):
    __tablename__ = 'auth_user'
    id = db.Column(db.Integer, primary_key=True)
    email = db.Column(db.String, index=True, unique=True)
    # TODO: Add other columns

    def __init__(self):
        # TODO: Initialize new user and add it to the database
        # (may need more parameters)
        pass

    # Any user that is logged in is automatically authenticated.
    def is_authenticated(self):
        return True

    # All users are active. We don't have "deactivated" accounts.
    def is_active(self):
        return True

    def is_anonymous(self):
        return not self.is_authenticated()
<commit_msg>Changing methods to properties<commit_after>from dli_app import db, login_manager

@login_manager.user_loader
def user_loader(user_id):
    return User.query.get(user_id)

class User(db.Model):
    __tablename__ = 'auth_user'
    id = db.Column(db.Integer, primary_key=True)
    email = db.Column(db.String, index=True, unique=True)
    # TODO: Add other columns

    def __init__(self):
        # TODO: Initialize new user and add it to the database
        # (may need more parameters)

        # Any user that is logged in is automatically authenticated.
        self._is_authenticated = True
        self._is_active = True

    @property
    def is_authenticated(self):
        return self._is_authenticated

    @property
    def is_active(self):
        return self._is_active

    @property
    def is_anonymous(self):
        return not self.is_authenticated()

{'fraction_non_alphanumeric': 0.08157099697885196, 'fraction_numerical': 0.0, 'mean_word_length': 3.0687960687960687, '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': '3189398', 'n_tokens_mistral': 513, 'n_tokens_neox': 493, 'n_words': 146}