diff options
| author | Shyam Sunder | 2020-09-01 14:06:22 -0400 |
|---|---|---|
| committer | Shyam Sunder | 2020-09-01 14:07:39 -0400 |
| commit | 0dd427755b601da8dadf9af1a34ecad03f8446f9 (patch) | |
| tree | 7f7e072132a834f1ac64e973a4ef1fd8d5a46a94 /server/szurubooru/func | |
| parent | 67a5dd7c18758304d42716383eb9497a143142b9 (diff) | |
client+server: fix linter issues due to updated pre-commit hooks
Diffstat (limited to 'server/szurubooru/func')
| -rw-r--r-- | server/szurubooru/func/images.py | 5 | ||||
| -rw-r--r-- | server/szurubooru/func/net.py | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/server/szurubooru/func/images.py b/server/szurubooru/func/images.py index 440fc06..6413ac8 100644 --- a/server/szurubooru/func/images.py +++ b/server/szurubooru/func/images.py @@ -54,7 +54,10 @@ class Image: ): duration = float(self.info["format"]["duration"]) if duration > 3: - cli = ["-ss", "%d" % math.floor(duration * 0.3),] + cli + cli = [ + "-ss", + "%d" % math.floor(duration * 0.3), + ] + cli content = self._execute(cli, ignore_error_if_data=True) if not content: raise errors.ProcessingError("Error while resizing image.") diff --git a/server/szurubooru/func/net.py b/server/szurubooru/func/net.py index bb43ddd..caa3fba 100644 --- a/server/szurubooru/func/net.py +++ b/server/szurubooru/func/net.py @@ -68,7 +68,8 @@ def post_to_webhooks(payload: Dict[str, Any]) -> List[int]: for webhook in config.config["webhooks"] or []: req = urllib.request.Request(webhook) req.data = json.dumps( - payload, default=lambda x: x.isoformat("T") + "Z", + payload, + default=lambda x: x.isoformat("T") + "Z", ).encode("utf-8") req.add_header("Content-Type", "application/json") try: |