Skip to content

Commit

Permalink
Format using isort
Browse files Browse the repository at this point in the history
  • Loading branch information
Garulf committed Nov 26, 2023
1 parent 2e64676 commit 4212e14
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 28 deletions.
9 changes: 3 additions & 6 deletions pyflowlauncher/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import os
import importlib.metadata
import logging
import os

from .plugin import Plugin, ResultResponse
from .result import Result, JsonRPCAction, send_results


import importlib.metadata

from .result import JsonRPCAction, Result, send_results

log_level = os.environ.get("FLOW_LAUNCHER_API_LOG_LEVEL", "INFO")

Expand Down
1 change: 1 addition & 0 deletions pyflowlauncher/api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import Optional

from .result import JsonRPCAction

NAME_SPACE = 'Flow.Launcher'
Expand Down
4 changes: 1 addition & 3 deletions pyflowlauncher/icons.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import os
import logging

import os
from pathlib import Path
from typing import Dict, Optional


_logger = logging.getLogger(__name__)

IMAGE_DIR = "Images"
Expand Down
5 changes: 3 additions & 2 deletions pyflowlauncher/jsonrpc.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from __future__ import annotations

import json
import sys
from typing import Any, Mapping

if sys.version_info < (3, 11):
from typing_extensions import TypedDict, NotRequired
from typing_extensions import NotRequired, TypedDict
else:
from typing import TypedDict, NotRequired
from typing import NotRequired, TypedDict


class JsonRPCRequest(TypedDict):
Expand Down
5 changes: 3 additions & 2 deletions pyflowlauncher/method.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from __future__ import annotations
from typing import Any, Dict, Optional

from abc import ABC, abstractmethod
from typing import Any, Dict, Optional

from .result import Result, JsonRPCAction, ResultResponse, send_results
from .result import JsonRPCAction, Result, ResultResponse, send_results
from .shared import logger


Expand Down
8 changes: 4 additions & 4 deletions pyflowlauncher/plugin.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from __future__ import annotations
from typing import Any, Iterable, Callable, Union

from functools import wraps
from typing import Any, Callable, Iterable, Union

from pyflowlauncher.shared import logger

from .result import JsonRPCAction, ResultResponse
from .jsonrpc import JsonRPCClient
from .event import EventHandler

from .jsonrpc import JsonRPCClient
from .result import JsonRPCAction, ResultResponse

Method = Callable[..., Union[ResultResponse, JsonRPCAction]]

Expand Down
15 changes: 4 additions & 11 deletions pyflowlauncher/result.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
from __future__ import annotations

import sys
from dataclasses import dataclass
from pathlib import Path
from typing import (
TYPE_CHECKING,
Any,
Iterable,
Optional,
Union,
Dict,
List
)
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Union

if sys.version_info < (3, 11):
from typing_extensions import TypedDict, NotRequired
from typing_extensions import NotRequired, TypedDict
else:
from typing import TypedDict, NotRequired
from typing import NotRequired, TypedDict


if TYPE_CHECKING:
Expand Down

0 comments on commit 4212e14

Please sign in to comment.