athphane / userbot

Field duplicates the name of its containing class PTC-W0052
Anti-pattern
Minor
6 months ago3 years old
Class member reminders has same name as its encolising class Reminders
 4
 5class Reminders:
 6    def __init__(self):
 7        self.reminders = database()["self_reminders"] 8
 9    def get_all_reminders(self):
10        query = self.reminders.find({}, {"_id": 0})
Class member profiles has same name as its encolising class Profiles
 3
 4class Profiles:
 5    def __init__(self):
 6        self.profiles = database()["profiles"] 7
 8    def all_profiles(self):
 9        return self.profiles.find()