From 4b649b3ef41ba6a2b2b61005207e1b3fa81f32c2 Mon Sep 17 00:00:00 2001 From: Felix Edel Date: Fri, 5 Jan 2024 15:32:23 +0100 Subject: [PATCH] Reformat files with newer black version --- tests/scraper/connections/test_github.py | 1 - tests/scraper/connections/test_init.py | 1 - tests/scraper/test_events.py | 1 - tests/scraper/test_integration.py | 2 -- tests/test_views.py | 1 - zubbi/scraper/connections/gerrit.py | 1 - zubbi/scraper/connections/github.py | 1 - zubbi/scraper/scraper.py | 1 - zubbi/views.py | 7 ------- 9 files changed, 16 deletions(-) diff --git a/tests/scraper/connections/test_github.py b/tests/scraper/connections/test_github.py index 5b21ca8..8809238 100644 --- a/tests/scraper/connections/test_github.py +++ b/tests/scraper/connections/test_github.py @@ -38,7 +38,6 @@ def test_get_app_auth_headers(): def test_get_installation_key(mock_github_api_endpoints): - mock_github_api_endpoints(GITHUB_URL) # Initialize GitHubConnection gh_con = GitHubConnection(**GITHUB_CON_CONFIG) diff --git a/tests/scraper/connections/test_init.py b/tests/scraper/connections/test_init.py index 01f8ece..901d8a6 100644 --- a/tests/scraper/connections/test_init.py +++ b/tests/scraper/connections/test_init.py @@ -88,7 +88,6 @@ def test_init_gerrit_con_invalid_webtype(patch_es): def test_init_github_con(patch_es, mock_github_api_endpoints): - mock_github_api_endpoints("https://localhost/github") config = { "ES_HOST": "localhost", diff --git a/tests/scraper/test_events.py b/tests/scraper/test_events.py index 57c22f6..ebd35aa 100644 --- a/tests/scraper/test_events.py +++ b/tests/scraper/test_events.py @@ -80,7 +80,6 @@ def test_event_installation_created( def test_event_installation_deleted( scrape_mock, patched_connections, payload_webhook_installation_deleted ): - # Ensure that some repositories can be looked up for this installation as they # are not part of the payload for a delete event. with mock.patch( diff --git a/tests/scraper/test_integration.py b/tests/scraper/test_integration.py index dc583ef..21ca644 100644 --- a/tests/scraper/test_integration.py +++ b/tests/scraper/test_integration.py @@ -68,7 +68,6 @@ class MockContents: - FILE = "file" DIR = "dir" @@ -78,7 +77,6 @@ def __init__(self, path, type): class MockGitHubRepository(GitHubRepository): - # TODO (felix): Improve the mocked repository class and allow mocking # single repositories for certain test cases. Currently, all test repos # are defined in this class definition. diff --git a/tests/test_views.py b/tests/test_views.py index 1c88c51..7d2463f 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -31,7 +31,6 @@ def test_views_reachable(flask_client, endpoint, expected): def test_detail_view(flask_client, es_client): - # Build a simple ES response, containing a minimal role result response = { "hits": { diff --git a/zubbi/scraper/connections/gerrit.py b/zubbi/scraper/connections/gerrit.py index 7fa0af2..0700fde 100644 --- a/zubbi/scraper/connections/gerrit.py +++ b/zubbi/scraper/connections/gerrit.py @@ -59,7 +59,6 @@ def build_directory_url(self, repo_name, directory_path): class GerritConnection(GitConnection): - WEB_URL_BUILDERS = {"cgit": CGitUrlBuilder, "gitweb": GitwebUrlBuilder} # TODO (felix): Should we ensure that only the user that started zubbi has access rights diff --git a/zubbi/scraper/connections/github.py b/zubbi/scraper/connections/github.py index 5d0f1d3..d19ce4e 100644 --- a/zubbi/scraper/connections/github.py +++ b/zubbi/scraper/connections/github.py @@ -29,7 +29,6 @@ class GitHubConnection: def __init__(self, url, app_id, app_key): - self.base_url = url self.api_url = urljoin(url, "api/v3") self.graphql_url = urljoin(url, "api/graphql") diff --git a/zubbi/scraper/scraper.py b/zubbi/scraper/scraper.py index b272b55..a725aa0 100644 --- a/zubbi/scraper/scraper.py +++ b/zubbi/scraper/scraper.py @@ -55,7 +55,6 @@ def scrape(self): return job_files, role_files def scrape_job_files(self): - job_files = self.iterate_directory( REPO_ROOT, whitelist=ZUUL_DIRECTORIES + ZUUL_FILES + self.extra_config_paths, diff --git a/zubbi/views.py b/zubbi/views.py index 3d25958..dfb0880 100644 --- a/zubbi/views.py +++ b/zubbi/views.py @@ -80,7 +80,6 @@ def get_context(self, **kwargs): class IndexView(ZubbiMethodView): - endpoint = "index" rule = "/" template_name = "index.html" @@ -91,7 +90,6 @@ def get(self): class SearchView(ZubbiMethodView): - endpoint = "search" rule = "/search" template_name = "search.html" @@ -190,7 +188,6 @@ def get(self): class DetailView(ZubbiMethodView): - endpoint = "details" rule = "/detail///" template_name = "details.html" @@ -215,7 +212,6 @@ def get(self, repo, block_type, name): class HowToView(ZubbiMethodView): - endpoint = "how-to" rule = "/how-to" template_name = "how-to.html" @@ -226,7 +222,6 @@ def get(self): class AutoCompleteView(ZubbiMethodView): - endpoint = "auto-complete" rule = "/api/search/autocomplete" template_name = None @@ -261,7 +256,6 @@ def get(self): class WebhookView(ZubbiMethodView): - endpoint = "webhook" rule = "/api/webhook" template_name = None @@ -320,7 +314,6 @@ def check_event(self, headers): class LmzifyView(IndexView): - endpoint = "lmzify" rule = "/lmzify" template_name = "lmzify.html"