fossasia / open-event-server

Protected member accessed from outside the class PYL-W0212
Bug risk
Minor
5 months ago4 years old
Access to a protected member _email of a client class
422    rows = [headers]
423    for follower in followers:
424        column = [follower.user.public_name if follower.user.public_name else '']
425        column.append(follower.user._email if follower.user._email else '')426        column.append(
427            follower.created_at.strftime('%B %-d, %Y %H:%M %z')
428            if follower.created_at
Access to a protected member _email of a client class
422    rows = [headers]
423    for follower in followers:
424        column = [follower.user.public_name if follower.user.public_name else '']
425        column.append(follower.user._email if follower.user._email else '')426        column.append(
427            follower.created_at.strftime('%B %-d, %Y %H:%M %z')
428            if follower.created_at
Access to a protected member _decl_class_registry of a client class
57    # Get all the models in the db, all models should have a explicit __tablename__
58    classes, models, table_names = [], [], []
59    # noinspection PyProtectedMember
60    for class_ in list(db.Model._decl_class_registry.values()):61        try:
62            table_names.append(class_.__tablename__)
63            classes.append(class_)
Access to a protected member _decl_class_registry of a client class
124        # Get all the models in the db, all models should have a explicit __tablename__
125        classes, models, table_names = [], [], []
126        # noinspection PyProtectedMember
127        for class_ in list(db.Model._decl_class_registry.values()):128            try:
129                table_names.append(class_.__tablename__)
130                classes.append(class_)
Access to a protected member _session of a client class
15    from objproxies import CallbackProxy
16
17    db._session = db.session
18    db.session = CallbackProxy(lambda: db._session)