mirror of
https://github.com/Benexl/FastAnime.git
synced 2026-01-06 17:53:40 -08:00
doc and style: formatted the whole codebase to pep8 plus added documentation where necessary
This commit is contained in:
@@ -1,22 +1,29 @@
|
||||
from kivymd.uix.snackbar import MDSnackbar,MDSnackbarText,MDSnackbarSupportingText
|
||||
from kivymd.uix.snackbar import MDSnackbar, MDSnackbarText, MDSnackbarSupportingText
|
||||
from kivy.clock import Clock
|
||||
|
||||
def show_notification(title,details):
|
||||
|
||||
def show_notification(title, details):
|
||||
"""helper function to display notifications
|
||||
|
||||
Args:
|
||||
title (str): the title of your message
|
||||
details (str): the details of your message
|
||||
"""
|
||||
|
||||
def _show(dt):
|
||||
MDSnackbar(
|
||||
MDSnackbarText(
|
||||
text=title,
|
||||
adaptive_height=True,
|
||||
),
|
||||
MDSnackbarSupportingText(
|
||||
text=details,
|
||||
shorten=False,
|
||||
max_lines=0,
|
||||
adaptive_height=True
|
||||
text=details, shorten=False, max_lines=0, adaptive_height=True
|
||||
),
|
||||
duration=5,
|
||||
y="10dp",
|
||||
pos_hint={"bottom": 1,"right":.99},
|
||||
pos_hint={"bottom": 1, "right": 0.99},
|
||||
padding=[0, 0, "8dp", "8dp"],
|
||||
size_hint_x=.4
|
||||
size_hint_x=0.4,
|
||||
).open()
|
||||
Clock.schedule_once(_show,1)
|
||||
|
||||
Clock.schedule_once(_show, 1)
|
||||
|
||||
Reference in New Issue
Block a user