Skip to content

Commit

Permalink
isort
Browse files Browse the repository at this point in the history
  • Loading branch information
jnussbaum committed Apr 15, 2024
1 parent 095d4b6 commit 108e0d9
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 16 deletions.
14 changes: 8 additions & 6 deletions dsp_permissions_scripts/oap/oap_get.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
from typing import Any, Iterable
from typing import Any
from typing import Iterable
from urllib.parse import quote_plus

from dsp_permissions_scripts.models.errors import ApiError
from dsp_permissions_scripts.oap.oap_model import Oap, OapRetrieveConfig, ResourceOap, ValueOap
from dsp_permissions_scripts.oap.oap_model import Oap
from dsp_permissions_scripts.oap.oap_model import OapRetrieveConfig
from dsp_permissions_scripts.oap.oap_model import ResourceOap
from dsp_permissions_scripts.oap.oap_model import ValueOap
from dsp_permissions_scripts.utils.dsp_client import DspClient
from dsp_permissions_scripts.utils.get_logger import get_logger
from dsp_permissions_scripts.utils.project import (
get_all_resource_class_iris_of_project,
get_project_iri_and_onto_iris_by_shortcode,
)
from dsp_permissions_scripts.utils.project import get_all_resource_class_iris_of_project
from dsp_permissions_scripts.utils.project import get_project_iri_and_onto_iris_by_shortcode
from dsp_permissions_scripts.utils.scope_serialization import create_scope_from_string

logger = get_logger(__name__)
Expand Down
4 changes: 3 additions & 1 deletion dsp_permissions_scripts/oap/oap_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

from typing import Literal

from pydantic import BaseModel, ConfigDict, model_validator
from pydantic import BaseModel
from pydantic import ConfigDict
from pydantic import model_validator

from dsp_permissions_scripts.models.scope import PermissionScope

Expand Down
4 changes: 3 additions & 1 deletion dsp_permissions_scripts/oap/oap_serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
from pathlib import Path
from typing import Literal

from dsp_permissions_scripts.oap.oap_model import Oap, ResourceOap, ValueOap
from dsp_permissions_scripts.oap.oap_model import Oap
from dsp_permissions_scripts.oap.oap_model import ResourceOap
from dsp_permissions_scripts.oap.oap_model import ValueOap
from dsp_permissions_scripts.utils.get_logger import get_logger

logger = get_logger(__name__)
Expand Down
11 changes: 7 additions & 4 deletions dsp_permissions_scripts/oap/oap_set.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# pylint: disable=too-many-arguments

from concurrent.futures import ThreadPoolExecutor, as_completed
from datetime import datetime
import itertools
import re
from concurrent.futures import ThreadPoolExecutor
from concurrent.futures import as_completed
from datetime import datetime

from dsp_permissions_scripts.models.errors import ApiError, PermissionsAlreadyUpToDate
from dsp_permissions_scripts.models.errors import ApiError
from dsp_permissions_scripts.models.errors import PermissionsAlreadyUpToDate
from dsp_permissions_scripts.models.scope import PermissionScope
from dsp_permissions_scripts.oap.oap_get import get_resource
from dsp_permissions_scripts.oap.oap_model import Oap, ValueOap
from dsp_permissions_scripts.oap.oap_model import Oap
from dsp_permissions_scripts.oap.oap_model import ValueOap
from dsp_permissions_scripts.utils.dsp_client import DspClient
from dsp_permissions_scripts.utils.get_logger import get_logger
from dsp_permissions_scripts.utils.scope_serialization import create_string_from_scope
Expand Down
6 changes: 4 additions & 2 deletions dsp_permissions_scripts/template.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from dsp_permissions_scripts.ap.ap_delete import delete_ap_of_group_on_server
from dsp_permissions_scripts.ap.ap_get import get_aps_of_project
from dsp_permissions_scripts.ap.ap_model import Ap, ApValue
from dsp_permissions_scripts.ap.ap_model import Ap
from dsp_permissions_scripts.ap.ap_model import ApValue
from dsp_permissions_scripts.ap.ap_serialize import serialize_aps_of_project
from dsp_permissions_scripts.ap.ap_set import apply_updated_aps_on_server
from dsp_permissions_scripts.doap.doap_get import get_doaps_of_project
Expand All @@ -11,7 +12,8 @@
from dsp_permissions_scripts.models.host import Hosts
from dsp_permissions_scripts.models.scope import PUBLIC
from dsp_permissions_scripts.oap.oap_get import get_all_oaps_of_project
from dsp_permissions_scripts.oap.oap_model import Oap, OapRetrieveConfig
from dsp_permissions_scripts.oap.oap_model import Oap
from dsp_permissions_scripts.oap.oap_model import OapRetrieveConfig
from dsp_permissions_scripts.oap.oap_serialize import serialize_oaps
from dsp_permissions_scripts.oap.oap_set import apply_updated_oaps_on_server
from dsp_permissions_scripts.utils.authentication import login
Expand Down
6 changes: 4 additions & 2 deletions tests/test_oap_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

from dsp_permissions_scripts.models import group
from dsp_permissions_scripts.models.scope import PermissionScope
from dsp_permissions_scripts.oap.oap_model import Oap, ResourceOap
from dsp_permissions_scripts.oap.oap_serialize import deserialize_oaps, serialize_oaps
from dsp_permissions_scripts.oap.oap_model import Oap
from dsp_permissions_scripts.oap.oap_model import ResourceOap
from dsp_permissions_scripts.oap.oap_serialize import deserialize_oaps
from dsp_permissions_scripts.oap.oap_serialize import serialize_oaps
from tests.test_scope_serialization import compare_scopes


Expand Down

0 comments on commit 108e0d9

Please sign in to comment.