Browse Source

Makes PEP8 happy

Dashie der otter 1 month ago
parent
commit
c33315993d
3 changed files with 6 additions and 6 deletions
  1. 1
    1
      app.py
  2. 1
    1
      forms.py
  3. 4
    4
      tasks.py

+ 1
- 1
app.py View File

@@ -39,7 +39,7 @@ try:
39 39
 
40 40
     print(" * Sentry support loaded")
41 41
     HAS_SENTRY = True
42
-except ImportError as e:
42
+except ImportError:
43 43
     print(" * No Sentry support")
44 44
     HAS_SENTRY = False
45 45
 

+ 1
- 1
forms.py View File

@@ -36,7 +36,7 @@ class ModelForm(BaseModelForm):
36 36
 
37 37
 
38 38
 class ExtendedRegisterForm(RegisterForm):
39
-    name = StringField("Username", [DataRequired(), Regexp(regex="^\w+$"), Length(max=150)])
39
+    name = StringField("Username", [DataRequired(), Regexp(regex=r"^\w+$"), Length(max=150)])
40 40
 
41 41
     def validate_name(form, field):
42 42
         if len(field.data) <= 0:

+ 4
- 4
tasks.py View File

@@ -159,7 +159,7 @@ def process_new_activity(self, iri: str) -> None:
159 159
 
160 160
     except (ActivityGoneError, ActivityNotFoundError):
161 161
         current_app.logger.exception(f"failed to process new activity" f" {iri}")
162
-    except Exception as err:
162
+    except Exception as err:  # noqa: F841
163 163
         current_app.logger.exception(f"failed to process new activity" f" {iri}")
164 164
 
165 165
 
@@ -206,7 +206,7 @@ def finish_inbox_processing(self, iri: str) -> None:
206 206
                 backend.undo_new_follower(actor, obj)
207 207
     except (ActivityGoneError, ActivityNotFoundError, NotAnActivityError):
208 208
         current_app.logger.exception(f"no retry")
209
-    except Exception as err:
209
+    except Exception as err:  # noqa: F841
210 210
         current_app.logger.exception(f"failed to cache attachments for" f" {iri}")
211 211
 
212 212
 
@@ -251,7 +251,7 @@ def finish_post_to_outbox(self, iri: str) -> None:
251 251
             post_to_remote_inbox.delay(payload, recp)
252 252
     except (ActivityGoneError, ActivityNotFoundError):
253 253
         current_app.logger.exception(f"no retry")
254
-    except Exception as err:
254
+    except Exception as err:  # noqa: F841
255 255
         current_app.logger.exception(f"failed to post " f"to remote inbox for {iri}")
256 256
 
257 257
 
@@ -313,7 +313,7 @@ def forward_activity(self, iri: str) -> None:
313 313
             payload = json.dumps(activity)
314 314
             post_to_remote_inbox.delay(payload, recp)
315 315
 
316
-    except Exception as err:
316
+    except Exception as err:  # noqa: F841
317 317
         current_app.logger.exception(f"failed to cache attachments for {iri}")
318 318
 
319 319
 

Loading…
Cancel
Save