From 163f0c1e74f779cb65691465fe6d946e74c73478 Mon Sep 17 00:00:00 2001 From: James Date: Sun, 1 May 2022 19:55:10 -0400 Subject: [PATCH] [blackd] Update line length, and format files --- .github/workflows/ci.yml | 2 +- main-rq.py | 2 +- main.py | 1 + pyproject.toml | 2 +- tests/conftest.py | 1 - tests/functional/test_storage.py | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ddb635..0e243d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: - name: Run Black Formatter uses: psf/black@stable with: - options: "--check --verbose" + options: "--check --verbose --line-length 180" check-image-build: name: Build Container Image diff --git a/main-rq.py b/main-rq.py index 554a172..fb36092 100644 --- a/main-rq.py +++ b/main-rq.py @@ -5,7 +5,7 @@ from crashserver.server import create_app from crashserver.server.models import Storage -if __name__ == '__main__': +if __name__ == "__main__": app = create_app() with app.app_context(), Connection(Redis("redis")): Storage.load_storage_modules() diff --git a/main.py b/main.py index 164cfd7..26220ab 100644 --- a/main.py +++ b/main.py @@ -6,6 +6,7 @@ # fmt: off import flask_migrate from gevent import monkey + monkey.patch_all() # fmt: on diff --git a/pyproject.toml b/pyproject.toml index e8a65e6..1eaace7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" [tool.black] -line-length = 120 +line-length = 180 [tool.pytest.ini_options] log_cli = true diff --git a/tests/conftest.py b/tests/conftest.py index 27c5078..62dcb31 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -8,7 +8,6 @@ @pytest.fixture(scope="session", autouse=True) def setup_session(client): - # Create Database flask_migrate.upgrade() diff --git a/tests/functional/test_storage.py b/tests/functional/test_storage.py index e95c82e..a263c65 100644 --- a/tests/functional/test_storage.py +++ b/tests/functional/test_storage.py @@ -3,7 +3,6 @@ import pytest from minio import Minio - from crashserver.server import db from crashserver.server.models import Storage @@ -41,6 +40,7 @@ class SampleFile: def __init__(self, filename, file_content): self.path = Path(filename) self.content = file_content + self.file_all = SampleFile("all_platforms.txt", b"ThisIsTheSavedFileContent!\n") self.file_s3 = SampleFile("s3only.txt", b"ThisFileIsOnS3Only!\n") self.file_fs = SampleFile("fsonly.txt", b"ThisFileIsOnFilesystemOnly!\n")