Skip to content

Commit

Permalink
Use same settings for formatting as toolbox
Browse files Browse the repository at this point in the history
  • Loading branch information
tomuben committed Nov 25, 2024
1 parent a8d6e68 commit 2136d96
Show file tree
Hide file tree
Showing 61 changed files with 329 additions and 77 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from typing import Optional, Tuple
from typing import (
Optional,
Tuple,
)

import click

Expand Down
6 changes: 5 additions & 1 deletion exasol_integration_test_docker_environment/doctor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
import sys
from collections.abc import Callable
from enum import Enum
from typing import Iterable, List, Tuple
from typing import (
Iterable,
List,
Tuple,
)

import docker
from docker.errors import DockerException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
from typing import Iterable, List, Optional
from typing import (
Iterable,
List,
Optional,
)


class ArgumentConstraintError(ValueError):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from typing import Optional, Tuple
from typing import (
Optional,
Tuple,
)

from exasol_integration_test_docker_environment.cli.options.docker_repository_options import (
DEFAULT_DOCKER_REPOSITORY_NAME,
Expand Down
12 changes: 11 additions & 1 deletion exasol_integration_test_docker_environment/lib/api/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@
import warnings
from datetime import datetime
from pathlib import Path
from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Set, Tuple
from typing import (
Any,
Callable,
Dict,
Iterable,
Iterator,
List,
Optional,
Set,
Tuple,
)

import luigi
import networkx
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from typing import Optional, Tuple
from typing import (
Optional,
Tuple,
)

from exasol_integration_test_docker_environment.cli.options.docker_repository_options import (
DEFAULT_DOCKER_REPOSITORY_NAME,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import functools
from typing import Any, Callable, Optional, Tuple
from typing import (
Any,
Callable,
Optional,
Tuple,
)

import humanfriendly

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import functools
from typing import Any, Callable, Optional, Tuple
from typing import (
Any,
Callable,
Optional,
Tuple,
)

import humanfriendly

Expand Down
14 changes: 12 additions & 2 deletions exasol_integration_test_docker_environment/lib/base/base_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,21 @@
import logging
import shutil
from pathlib import Path
from typing import Any, Dict, Generator, List, Set, Union
from typing import (
Any,
Dict,
Generator,
List,
Set,
Union,
)

import luigi
import six
from luigi import Task, util
from luigi import (
Task,
util,
)
from luigi.parameter import ParameterVisibility
from luigi.task import TASK_ID_TRUNCATE_HASH

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import time
from abc import abstractmethod
from typing import Optional, Protocol, runtime_checkable
from typing import (
Optional,
Protocol,
runtime_checkable,
)

import docker
import fabric
from docker import DockerClient
from docker.models.containers import Container, ExecResult
from docker.models.containers import (
Container,
ExecResult,
)
from paramiko.ssh_exception import NoValidConnectionsError

from exasol_integration_test_docker_environment.lib.base.ssh_access import SshKey
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
from pathlib import Path
from typing import Generator, List
from typing import (
Generator,
List,
)

import luigi
from luigi import Task
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
from pathlib import Path
from typing import Any, Dict, List
from typing import (
Any,
Dict,
List,
)

import luigi

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import jsonpickle
from luigi.parameter import Parameter, ParameterVisibility, _no_value
from luigi.parameter import (
Parameter,
ParameterVisibility,
_no_value,
)


class JsonPickleParameter(Parameter):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
from pathlib import Path
from typing import Any, Optional
from typing import (
Any,
Optional,
)

import jsonpickle
from luigi import LocalTarget
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
import tempfile
from dataclasses import dataclass
from pathlib import Path
from typing import Any, Callable, Generator, List, Optional
from typing import (
Any,
Callable,
Generator,
List,
Optional,
)

import jinja2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
import tempfile
from pathlib import Path
from string import Template
from typing import Optional, Union
from typing import (
Optional,
Union,
)

import paramiko
import portalocker
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import threading
import time
from datetime import datetime, timedelta
from datetime import (
datetime,
timedelta,
)

from exasol_integration_test_docker_environment.lib.config.log_config import log_config

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import traceback
from collections import OrderedDict
from pathlib import Path
from typing import Dict, List
from typing import (
Dict,
List,
)

from exasol_integration_test_docker_environment.lib.base.timeable_base_task import (
TimeableBaseTask,
Expand Down Expand Up @@ -60,7 +63,7 @@ def collect_failures(self) -> Dict[str, None]:
exception = f.read().strip()
prefix = " "
formatted_exception = prefix + prefix.join(exception.splitlines(True))
failure_message = "- {}:\n{}".format(self.task_id, formatted_exception)
failure_message = f"- {self.task_id}:\n{formatted_exception}"
failures[failure_message] = None

return failures
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from typing import List, Optional
from typing import (
List,
Optional,
)

import luigi

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from typing import List, Optional
from typing import (
List,
Optional,
)

from exasol_integration_test_docker_environment.lib.base.info import Info
from exasol_integration_test_docker_environment.lib.data.docker_network_info import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
from pathlib import Path
from typing import List, Optional
from typing import (
List,
Optional,
)

from exasol_integration_test_docker_environment.lib.base.info import Info

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import copy
from typing import Dict, Set
from typing import (
Dict,
Set,
)

from exasol_integration_test_docker_environment.abstract_method_exception import (
AbstractMethodException,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import abc
from pathlib import Path
from typing import Dict, Optional, Type
from typing import (
Dict,
Optional,
Type,
)

import docker
import git
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import base64
import hashlib
from pathlib import Path, PurePath
from pathlib import (
Path,
PurePath,
)
from typing import Dict

# TODO add hash config to the hash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
import stat
from dataclasses import dataclass
from multiprocessing import Pool
from pathlib import Path, PurePath
from typing import Callable, List
from pathlib import (
Path,
PurePath,
)
from typing import (
Callable,
List,
)

import humanfriendly

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
from datetime import datetime
from enum import Enum
from typing import Any, Dict, Optional
from typing import (
Any,
Dict,
Optional,
)

from exasol_integration_test_docker_environment.lib.base.info import Info

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import itertools
from typing import Dict, List
from typing import (
Dict,
List,
)

from exasol_integration_test_docker_environment.abstract_method_exception import (
AbstractMethodException,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from typing import Callable, List
from typing import (
Callable,
List,
)


def find_images_by_tag(docker_client, condition: Callable[[str], bool]) -> List:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
from pathlib import Path
from typing import Any, Generator, Optional, Tuple
from typing import (
Any,
Generator,
Optional,
Tuple,
)

import luigi

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from typing import Dict, Set
from typing import (
Dict,
Set,
)

from exasol_integration_test_docker_environment.lib.config.build_config import (
build_config,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from typing import Dict, Set
from typing import (
Dict,
Set,
)

import luigi

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
from typing import Dict, Generator, Optional, Set
from typing import (
Dict,
Generator,
Optional,
Set,
)

import docker
import luigi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import logging
from pathlib import Path, PurePath
from pathlib import (
Path,
PurePath,
)

import luigi

Expand Down
Loading

0 comments on commit 2136d96

Please sign in to comment.