Browse Source

Makes PEP8 happy

pull/5/head
Dashie der otter 10 months 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:

print(" * Sentry support loaded")
HAS_SENTRY = True
except ImportError as e:
except ImportError:
print(" * No Sentry support")
HAS_SENTRY = False


+ 1
- 1
forms.py View File

@@ -36,7 +36,7 @@ class ModelForm(BaseModelForm):


class ExtendedRegisterForm(RegisterForm):
name = StringField("Username", [DataRequired(), Regexp(regex="^\w+$"), Length(max=150)])
name = StringField("Username", [DataRequired(), Regexp(regex=r"^\w+$"), Length(max=150)])

def validate_name(form, field):
if len(field.data) <= 0:

+ 4
- 4
tasks.py View File

@@ -159,7 +159,7 @@ def process_new_activity(self, iri: str) -> None:

except (ActivityGoneError, ActivityNotFoundError):
current_app.logger.exception(f"failed to process new activity" f" {iri}")
except Exception as err:
except Exception as err: # noqa: F841
current_app.logger.exception(f"failed to process new activity" f" {iri}")


@@ -206,7 +206,7 @@ def finish_inbox_processing(self, iri: str) -> None:
backend.undo_new_follower(actor, obj)
except (ActivityGoneError, ActivityNotFoundError, NotAnActivityError):
current_app.logger.exception(f"no retry")
except Exception as err:
except Exception as err: # noqa: F841
current_app.logger.exception(f"failed to cache attachments for" f" {iri}")


@@ -251,7 +251,7 @@ def finish_post_to_outbox(self, iri: str) -> None:
post_to_remote_inbox.delay(payload, recp)
except (ActivityGoneError, ActivityNotFoundError):
current_app.logger.exception(f"no retry")
except Exception as err:
except Exception as err: # noqa: F841
current_app.logger.exception(f"failed to post " f"to remote inbox for {iri}")


@@ -313,7 +313,7 @@ def forward_activity(self, iri: str) -> None:
payload = json.dumps(activity)
post_to_remote_inbox.delay(payload, recp)

except Exception as err:
except Exception as err: # noqa: F841
current_app.logger.exception(f"failed to cache attachments for {iri}")



Loading…
Cancel
Save