This is the complaint from pylint. Im re-working the scrpits to get rid of it. Seems adding classes do the trick.
I disabled the message with # pylint: disable=R0902
Was going to do it in the configuration but decided that someone though 7 was enough in coding?
Output:************* Module test
R: 91, 0: Too many instance attributes (11/7) (too-many-instance-attributes)
------------------------------------------------------------------
Your code has been rated at 9.91/10 (previous run: 9.91/10, +0.00)
class MainWindow: '''Docstring''' def __init__(self): self.root_window() self.container_frames() self.left_inner_frame() self.right_inner_frame() self.logo() self.show_footer() def root_window(self): '''Docstring''' self.root = ttk.Frame() self.root.grid_columnconfigure(0, weight=1) self.root.grid_rowconfigure(0, weight=1) def container_frames(self): '''Doc''' self.logo_frame = ttk.Frame(self.root) self.logo_frame.grid(column=0, row=0, sticky='new') self.logo_frame.grid_columnconfigure(0, weight=3) self.letter_menu_frame = ttk.Frame(self.root, relief='raised', padding=5) self.letter_menu_frame.grid(column=0, row=1, sticky='new') for i in range(26): self.letter_menu_frame.grid_columnconfigure(i, weight=3) self.multigrid_frame = ttk.Frame(self.root) self.multigrid_frame.grid(column=0, row=2, sticky='nw') self.multigrid_frame.grid_columnconfigure(0, weight=3) self.footer_frame = ttk.Frame(self.root) self.footer_frame.grid(column=0, row=3, sticky='new') self.footer_frame.grid_columnconfigure(0, weight=3) def left_inner_frame(self): '''Doc''' self.menu_title_frame = ttk.Frame(self.multigrid_frame) self.menu_title_frame.grid(column=0, row=0, sticky='nsw') self.menu_title_frame.grid_columnconfigure(0, weight=3) self.menu_title_frame.grid_rowconfigure(0, weight=3) def right_inner_frame(self): '''Doc''' self.get_recipe_frame = ttk.Frame(self.multigrid_frame) self.get_recipe_frame.grid(column=1, row=0, sticky='nsw') self.get_recipe_frame.grid_columnconfigure(0, weight=3) self.get_recipe_frame.grid_rowconfigure(0, weight=3) def logo(self): '''Docstring''' self.imgfile = tk.PhotoImage(file='/home/johnny/Desktop/play/cookbook_logo.png') self.img_logo = ttk.Label(self.logo_frame, image=self.imgfile, anchor='n') self.img_logo.grid(column=0, row=0, sticky='new') def show_footer(self): '''Docstring''' self.style = ttk.Style() self.style.map('my_footer.TLabel') self.style.configure('my_footer.TLabel', \ foreground='blue', font=('Sans', 9, 'normal'), padding=8, border=2) self.footer = ttk.Button(self.footer_frame, \ text='Register @ Johnny\'s CookBook', \ style='my_footer.TLabel', cursor='hand2', command=web) self.footer.grid(column=0, row=0, sticky='n') self.footer.grid_columnconfigure(0, weight=3) def main(): '''Socstring''' root = tk.Tk() root.title('Johnny\'s CookBook') imgfile = tk.PhotoImage(file='/home/johnny/Desktop/play/cookbook_logo.png') root.configure(width=imgfile.width(), border=5, relief='ridge') root.resizable(width=False, height=False) MainWindow() root.mainloop() if __name__ == '__main__': main()
I disabled the message with # pylint: disable=R0902
Was going to do it in the configuration but decided that someone though 7 was enough in coding?
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags