Skip to content

Commit

Permalink
style: ran 'find -name *.py -not -path ./src/diracx/client/* -exec py…
Browse files Browse the repository at this point in the history
…upgrade --py311-plus {} +'
  • Loading branch information
fstagni committed Sep 6, 2023
1 parent cecc749 commit 480d5b5
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/diracx/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
@app.async_command()
async def login(
vo: str,
group: Optional[str] = None,
property: Optional[list[str]] = Option(
group: str | None = None,
property: list[str] | None = Option(
None, help="Override the default(s) with one or more properties"
),
):
Expand Down Expand Up @@ -82,7 +82,7 @@ async def logout():


@app.callback()
def callback(output_format: Optional[str] = None):
def callback(output_format: str | None = None):
if "DIRACX_OUTPUT_FORMAT" not in os.environ:
output_format = output_format or "RICH"
if output_format is not None:
Expand Down
2 changes: 0 additions & 2 deletions src/diracx/cli/internal.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import json
from pathlib import Path

Expand Down
6 changes: 3 additions & 3 deletions src/diracx/core/config/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ class GroupConfig(BaseModel):
AutoAddVOMS: bool = False
AutoUploadPilotProxy: bool = False
AutoUploadProxy: bool = False
JobShare: Optional[int]
JobShare: int | None
Properties: list[SecurityProperty]
Quota: Optional[int]
Quota: int | None
Users: list[str]
AllowBackgroundTQs: bool = False
VOMSRole: Optional[str]
VOMSRole: str | None
AutoSyncVOMS: bool = False


Expand Down
4 changes: 1 addition & 3 deletions src/diracx/core/extensions.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
from __future__ import absolute_import

__all__ = ("select_from_extension",)

import os
from collections import defaultdict
from importlib.metadata import EntryPoint, entry_points
from importlib.util import find_spec
from typing import Iterator
from collections.abc import Iterator


def extensions_by_priority() -> Iterator[str]:
Expand Down
2 changes: 1 addition & 1 deletion src/diracx/core/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import inspect
import operator
from typing import Callable
from collections.abc import Callable

from diracx.core.extensions import select_from_extension

Expand Down
3 changes: 2 additions & 1 deletion src/diracx/db/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
from abc import ABCMeta
from datetime import datetime, timedelta, timezone
from functools import partial
from typing import TYPE_CHECKING, AsyncIterator, Self
from typing import TYPE_CHECKING, Self
from collections.abc import AsyncIterator

from pydantic import parse_obj_as
from sqlalchemy import Column as RawColumn
Expand Down
3 changes: 2 additions & 1 deletion src/diracx/routers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import logging
import os
from functools import partial
from typing import AsyncContextManager, AsyncGenerator, Iterable, TypeVar
from typing import AsyncContextManager, TypeVar
from collections.abc import AsyncGenerator, Iterable

import dotenv
from fastapi import APIRouter, Depends, Request
Expand Down

0 comments on commit 480d5b5

Please sign in to comment.