From e0239a4eb4acf34a4baea34cf2605950c2dd64ee Mon Sep 17 00:00:00 2001 From: Joe Mancuso Date: Tue, 29 Oct 2024 14:46:28 -0400 Subject: [PATCH] linted --- src/masonite/notification/Notifiable.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/masonite/notification/Notifiable.py b/src/masonite/notification/Notifiable.py index 8f977d7d..4613ffb5 100644 --- a/src/masonite/notification/Notifiable.py +++ b/src/masonite/notification/Notifiable.py @@ -6,7 +6,8 @@ class Notifiable: - """Notifiable mixin allowing to send notification to a model. It's often used with the + """Notifiable mixin allowing to send + notification to a model. It's often used with the User model. Usage: @@ -15,17 +16,18 @@ class Notifiable: def notify(self, notification, drivers=[], dry=False, fail_silently=False): """Send the given notification.""" from wsgi import application - + if hasattr(notification, "send"): notification.send(notification, drivers, dry, fail_silently) - + return application.make("notification").send( self, notification, drivers, dry, fail_silently ) def route_notification_for(self, driver): - """Get the notification routing information for the given driver. If method has not been - defined on the model: for mail driver try to use 'email' field of model.""" + """Get the notification routing information for the given driver. + If method has not been defined on the model: + for mail driver try to use 'email' field of model.""" # check if routing has been specified on the model method_name = "route_notification_for_{0}".format(driver) @@ -41,7 +43,8 @@ def route_notification_for(self, driver): return self.email else: raise NotificationException( - "Notifiable model does not implement {}".format(method_name) + "Notifiable model " + "does not implement {}".format(method_name) ) @has_many("id", "notifiable_id")