Browse Source

clean up following PEP8 rules

Guénaël Muller 7 years ago
parent
commit
4b172c5816
2 changed files with 5 additions and 5 deletions
  1. 3 3
      tracim/tracim/lib/email.py
  2. 2 2
      tracim/tracim/lib/notifications.py

+ 3 - 3
tracim/tracim/lib/email.py View File

159
         message['Subject'] = subject
159
         message['Subject'] = subject
160
         message['From'] = formataddr((
160
         message['From'] = formataddr((
161
             self._global_config.EMAIL_NOTIFICATION_FROM_DEFAULT_LABEL,
161
             self._global_config.EMAIL_NOTIFICATION_FROM_DEFAULT_LABEL,
162
-            self._global_config.EMAIL_NOTIFICATION_FROM_EMAIL)
163
-        )
164
-        message['To'] = formataddr(('',user.email))
162
+            self._global_config.EMAIL_NOTIFICATION_FROM_EMAIL,
163
+        ))
164
+        message['To'] = formataddr(('', user.email))
165
 
165
 
166
         text_template_file_path = self._global_config.EMAIL_NOTIFICATION_CREATED_ACCOUNT_TEMPLATE_TEXT  # nopep8
166
         text_template_file_path = self._global_config.EMAIL_NOTIFICATION_CREATED_ACCOUNT_TEMPLATE_TEXT  # nopep8
167
         html_template_file_path = self._global_config.EMAIL_NOTIFICATION_CREATED_ACCOUNT_TEMPLATE_HTML  # nopep8
167
         html_template_file_path = self._global_config.EMAIL_NOTIFICATION_CREATED_ACCOUNT_TEMPLATE_HTML  # nopep8

+ 2 - 2
tracim/tracim/lib/notifications.py View File

208
         else:
208
         else:
209
             email_address = email_template.replace('{user_id}', '0')
209
             email_address = email_template.replace('{user_id}', '0')
210
 
210
 
211
-        return formataddr((mail_sender_name,email_address))
211
+        return formataddr((mail_sender_name, email_address))
212
 
212
 
213
     @staticmethod
213
     @staticmethod
214
     def log_notification(
214
     def log_notification(
267
 
267
 
268
         for role in notifiable_roles:
268
         for role in notifiable_roles:
269
             logger.info(self, 'Sending email to {}'.format(role.user.email))
269
             logger.info(self, 'Sending email to {}'.format(role.user.email))
270
-            to_addr = formataddr((role.user.display_name,role.user.email))
270
+            to_addr = formataddr((role.user.display_name, role.user.email))
271
 
271
 
272
             #
272
             #
273
             #  INFO - D.A. - 2014-11-06
273
             #  INFO - D.A. - 2014-11-06