Skip to content

Commit

Permalink
Reformat with black
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
pulpbot authored and lubosmj committed Apr 15, 2024
1 parent 1bbb310 commit 742acc5
Show file tree
Hide file tree
Showing 25 changed files with 34 additions and 6 deletions.
1 change: 1 addition & 0 deletions .ci/scripts/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
But some pulp paths start with curly brackets e.g. {artifact_href}
This script modifies drf-spectacular schema validation to accept slashes and curly brackets.
"""

import json
from drf_spectacular.validation import JSON_SCHEMA_SPEC_PATH

Expand Down
8 changes: 5 additions & 3 deletions pulp_container/app/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,11 @@ async def init_pending_content(self, digest, manifest_data, media_type, artifact

manifest = Manifest(
digest=digest,
schema_version=2
if manifest_data["mediaType"] in (MEDIA_TYPE.MANIFEST_V2, MEDIA_TYPE.MANIFEST_OCI)
else 1,
schema_version=(
2
if manifest_data["mediaType"] in (MEDIA_TYPE.MANIFEST_V2, MEDIA_TYPE.MANIFEST_OCI)
else 1
),
media_type=media_type,
config_blob=config_blob,
)
Expand Down
1 change: 1 addition & 0 deletions pulp_container/app/registry_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
. _Plugin Writer's Guide:
http://docs.pulpproject.org/plugins/plugin-writer/index.html
"""

import base64
import binascii
import json
Expand Down
9 changes: 6 additions & 3 deletions pulp_container/app/tasks/sync_stages.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,12 @@ async def create_listed_manifest(self, manifest_data):

manifest = Manifest(
digest=digest,
schema_version=2
if content_data["mediaType"] in (MEDIA_TYPE.MANIFEST_V2, MEDIA_TYPE.MANIFEST_OCI)
else 1,
schema_version=(
2
if content_data["mediaType"]
in (MEDIA_TYPE.MANIFEST_V2, MEDIA_TYPE.MANIFEST_OCI)
else 1
),
media_type=content_data["mediaType"],
annotations=content_data.get("annotations", {}),
)
Expand Down
1 change: 1 addition & 0 deletions pulp_container/app/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
. _Plugin Writer's Guide:
http://docs.pulpproject.org/plugins/plugin-writer/index.html
"""

import logging

from django.db import IntegrityError
Expand Down
1 change: 1 addition & 0 deletions pulp_container/tests/functional/api/test_content_cache.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests related to the Redis content caching."""

import os
import requests
import unittest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests that CRUD distributions."""

import json
import unittest

Expand Down
1 change: 1 addition & 0 deletions pulp_container/tests/functional/api/test_crud_remotes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests that CRUD container remotes."""

from random import choice
import unittest

Expand Down
1 change: 1 addition & 0 deletions pulp_container/tests/functional/api/test_flatpak.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests that verify Flatpak support"""

import pytest
import subprocess

Expand Down
1 change: 1 addition & 0 deletions pulp_container/tests/functional/api/test_pull_content.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests that verify that images served by Pulp can be pulled."""

import contextlib
import hashlib
import requests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
NOTE: assumes ALLOWED_EXPORT_PATHS setting contains "/tmp" - all tests will fail if this is not
the case.
"""

import pytest
import uuid

Expand Down
1 change: 1 addition & 0 deletions pulp_container/tests/functional/api/test_push_content.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests that verify that images can be pushed to Pulp."""

import json
import pytest
import requests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests that verify that an image signature can be pushed to Pulp."""

import base64
import json
import pytest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests that verify that RBAC for push repository works properly."""

import pytest

from pulp_smash import utils
Expand Down
1 change: 1 addition & 0 deletions pulp_container/tests/functional/api/test_rbac_remotes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests that container remotes have RBAC."""

from random import choice
import pytest

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests that verify that RBAC for content works properly."""

import pytest

from pulp_smash.pulp3.bindings import monitor_task
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests that verify that RBAC for repository versions work properly."""

import pytest

from pulp_smash import utils
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests that container sync repositories have RBAC."""

import pytest

from pulp_smash import utils
Expand Down
1 change: 1 addition & 0 deletions pulp_container/tests/functional/api/test_recursive_add.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests that recursively add container content to repositories."""

from pulp_smash.pulp3.bindings import (
delete_orphans,
monitor_task,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests that recursively remove container content from repositories."""

import unittest

from urllib.parse import urlparse
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for fetching the list of all repositories."""

import unittest

from urllib.parse import urljoin
Expand Down
1 change: 1 addition & 0 deletions pulp_container/tests/functional/api/test_sync.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests that sync container plugin repositories."""

import pytest
from pulpcore.tests.functional import PulpTaskError

Expand Down
1 change: 1 addition & 0 deletions pulp_container/tests/functional/api/test_tagging_images.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for tagging and untagging images."""

import unittest

from urllib.parse import urlparse
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for token authentication."""

import aiohttp
import asyncio
import unittest
Expand Down
1 change: 1 addition & 0 deletions pulp_container/tests/functional/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utilities for tests for the container plugin."""

import pytest
import requests

Expand Down

0 comments on commit 742acc5

Please sign in to comment.