From 07ea97880927586485e4d1afd4a58cdfe6ba672d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 Feb 2024 23:38:37 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- sheetwork/core/adapters/base/connection.py | 4 ++-- sheetwork/core/adapters/base/impl.py | 1 + sheetwork/core/adapters/factory.py | 1 + sheetwork/core/adapters/postgres/impl.py | 1 + sheetwork/core/adapters/snowflake/connection.py | 1 + sheetwork/core/adapters/snowflake/impl.py | 1 + sheetwork/core/cleaner.py | 1 + sheetwork/core/clients/google.py | 1 + sheetwork/core/clients/system.py | 1 + sheetwork/core/config/config.py | 1 + sheetwork/core/config/profile.py | 1 + sheetwork/core/config/project.py | 1 + sheetwork/core/exceptions.py | 1 + sheetwork/core/flags.py | 1 + sheetwork/core/main.py | 1 + sheetwork/core/sheetwork.py | 1 + sheetwork/core/task/init.py | 1 + sheetwork/core/ui/printer.py | 1 + sheetwork/core/ui/traceback_manager.py | 1 + sheetwork/core/utils.py | 1 + sheetwork/core/yaml/yaml_helpers.py | 1 + sheetwork/core/yaml/yaml_schema.py | 1 + 22 files changed, 23 insertions(+), 2 deletions(-) diff --git a/sheetwork/core/adapters/base/connection.py b/sheetwork/core/adapters/base/connection.py index 345f7e76..8e1e6480 100644 --- a/sheetwork/core/adapters/base/connection.py +++ b/sheetwork/core/adapters/base/connection.py @@ -1,4 +1,5 @@ """ABC to define what an concrete Connection object should look like.""" + import abc @@ -6,8 +7,7 @@ class BaseCredentials(abc.ABC): """Base class to define basic API contract for a Credentials class and its methods.""" @abc.abstractmethod - def parse_and_validate_credentials(self): - ... + def parse_and_validate_credentials(self): ... class BaseConnection(abc.ABC): # noqa D101 diff --git a/sheetwork/core/adapters/base/impl.py b/sheetwork/core/adapters/base/impl.py index 286d8cca..813f97f1 100644 --- a/sheetwork/core/adapters/base/impl.py +++ b/sheetwork/core/adapters/base/impl.py @@ -1,4 +1,5 @@ """Abstract definition of what a basic SQL adaptor should look like to satisfy the rest of the contracts.""" + import abc from typing import Any, Dict, Optional, Tuple diff --git a/sheetwork/core/adapters/factory.py b/sheetwork/core/adapters/factory.py index 631413f8..87afa684 100644 --- a/sheetwork/core/adapters/factory.py +++ b/sheetwork/core/adapters/factory.py @@ -1,4 +1,5 @@ """Database Adaper factory.""" + import importlib from typing import Type diff --git a/sheetwork/core/adapters/postgres/impl.py b/sheetwork/core/adapters/postgres/impl.py index c8e417be..45416aac 100644 --- a/sheetwork/core/adapters/postgres/impl.py +++ b/sheetwork/core/adapters/postgres/impl.py @@ -1,4 +1,5 @@ """Concrete database implementations for Postgres Connector.""" + from typing import Any, Optional, Tuple import pandas diff --git a/sheetwork/core/adapters/snowflake/connection.py b/sheetwork/core/adapters/snowflake/connection.py index 61f3a819..7574d3fa 100644 --- a/sheetwork/core/adapters/snowflake/connection.py +++ b/sheetwork/core/adapters/snowflake/connection.py @@ -1,4 +1,5 @@ """Concrete Snowflake Database Connection classes.""" + from typing import Dict from pydantic import BaseModel, ValidationError, validator diff --git a/sheetwork/core/adapters/snowflake/impl.py b/sheetwork/core/adapters/snowflake/impl.py index 06c375a6..1ffc795c 100644 --- a/sheetwork/core/adapters/snowflake/impl.py +++ b/sheetwork/core/adapters/snowflake/impl.py @@ -1,4 +1,5 @@ """Module containing all Database Specific classes.""" + import tempfile from typing import Any, Optional, Tuple diff --git a/sheetwork/core/cleaner.py b/sheetwork/core/cleaner.py index 75eb3f6e..f8830806 100644 --- a/sheetwork/core/cleaner.py +++ b/sheetwork/core/cleaner.py @@ -1,4 +1,5 @@ """Cleaning module. Holds SheetCleaner which holds df kinds of cleanings.""" + import re from typing import List, Union diff --git a/sheetwork/core/clients/google.py b/sheetwork/core/clients/google.py index c73356eb..fea419d9 100644 --- a/sheetwork/core/clients/google.py +++ b/sheetwork/core/clients/google.py @@ -1,4 +1,5 @@ """Houses classes and methods to help interacting with Google Spreasheet API. Uses `gspread` mainly.""" + from pathlib import Path from typing import Any, List, Tuple diff --git a/sheetwork/core/clients/system.py b/sheetwork/core/clients/system.py index 497747a4..6759bd06 100644 --- a/sheetwork/core/clients/system.py +++ b/sheetwork/core/clients/system.py @@ -1,4 +1,5 @@ """System related interaction methods.""" + import sys from pathlib import Path diff --git a/sheetwork/core/config/config.py b/sheetwork/core/config/config.py index fdedb8e1..f2ee7c4b 100644 --- a/sheetwork/core/config/config.py +++ b/sheetwork/core/config/config.py @@ -1,4 +1,5 @@ """Configuration class module. Loads project-wide params and all that fun stuff.""" + from pathlib import Path from typing import Any, Dict, List, Sequence, Union diff --git a/sheetwork/core/config/profile.py b/sheetwork/core/config/profile.py index 4a8f9382..995b5bc9 100644 --- a/sheetwork/core/config/profile.py +++ b/sheetwork/core/config/profile.py @@ -1,4 +1,5 @@ """Houses Profile class which parses information from profiles.yml such as db type, creds etc.""" + from pathlib import Path from typing import Dict diff --git a/sheetwork/core/config/project.py b/sheetwork/core/config/project.py index defd12e3..f547d3b8 100644 --- a/sheetwork/core/config/project.py +++ b/sheetwork/core/config/project.py @@ -1,4 +1,5 @@ """Houses Project parsing class from sheetwork_project.yml.""" + import time from pathlib import Path from typing import Dict, Union diff --git a/sheetwork/core/exceptions.py b/sheetwork/core/exceptions.py index 6397b277..2f73fc07 100644 --- a/sheetwork/core/exceptions.py +++ b/sheetwork/core/exceptions.py @@ -1,4 +1,5 @@ """Contains all Sheetwork exceptions. Truely exceptional!""" + from colorama import Fore diff --git a/sheetwork/core/flags.py b/sheetwork/core/flags.py index e2439c7a..71a4df14 100644 --- a/sheetwork/core/flags.py +++ b/sheetwork/core/flags.py @@ -3,6 +3,7 @@ This class which will instanciate CLI args default and/or consume CLI arguments. """ + import sys from argparse import ArgumentParser from typing import List diff --git a/sheetwork/core/main.py b/sheetwork/core/main.py index 973d271e..12bd19b8 100644 --- a/sheetwork/core/main.py +++ b/sheetwork/core/main.py @@ -1,4 +1,5 @@ """Main module for sheetwork. Sets up Arguments to parse and task handling. That's it!""" + import argparse import sys from typing import List, Union diff --git a/sheetwork/core/sheetwork.py b/sheetwork/core/sheetwork.py index 3e6176f0..8b670816 100644 --- a/sheetwork/core/sheetwork.py +++ b/sheetwork/core/sheetwork.py @@ -1,4 +1,5 @@ """Sheetwork main orchestration module containing.""" + import sys from typing import List, Optional, Tuple, Union diff --git a/sheetwork/core/task/init.py b/sheetwork/core/task/init.py index 5f88a30e..b5d16dab 100644 --- a/sheetwork/core/task/init.py +++ b/sheetwork/core/task/init.py @@ -1,4 +1,5 @@ """House of the sheetwork init task that helps users set up their projects. It's by far the cutest part of the code.""" + import time from pathlib import Path diff --git a/sheetwork/core/ui/printer.py b/sheetwork/core/ui/printer.py index 9ddd18ec..a11a1836 100644 --- a/sheetwork/core/ui/printer.py +++ b/sheetwork/core/ui/printer.py @@ -1,4 +1,5 @@ """Sets up some easy colour shortcuts to make sure we can easily colour logs and prints.""" + import time from sheetwork.core.ui.colours import COLOURS diff --git a/sheetwork/core/ui/traceback_manager.py b/sheetwork/core/ui/traceback_manager.py index 9e5df4c5..4c618faa 100644 --- a/sheetwork/core/ui/traceback_manager.py +++ b/sheetwork/core/ui/traceback_manager.py @@ -1,4 +1,5 @@ """Holds some fun stuff to allow for quantity of traceback printed to stout. Nothing too magical.""" + import pretty_errors from sheetwork.core.flags import FlagParser diff --git a/sheetwork/core/utils.py b/sheetwork/core/utils.py index 2161cc6d..a7258fde 100644 --- a/sheetwork/core/utils.py +++ b/sheetwork/core/utils.py @@ -1,4 +1,5 @@ """Bunch of things needed by a bunch of other things which kinda don't have a better place to go.""" + import collections import warnings from pathlib import Path diff --git a/sheetwork/core/yaml/yaml_helpers.py b/sheetwork/core/yaml/yaml_helpers.py index 89f4d119..751bce2b 100644 --- a/sheetwork/core/yaml/yaml_helpers.py +++ b/sheetwork/core/yaml/yaml_helpers.py @@ -1,4 +1,5 @@ """Helpers for yml stuff.""" + from pathlib import Path from typing import Any, Dict diff --git a/sheetwork/core/yaml/yaml_schema.py b/sheetwork/core/yaml/yaml_schema.py index c3714281..3d7007e7 100644 --- a/sheetwork/core/yaml/yaml_schema.py +++ b/sheetwork/core/yaml/yaml_schema.py @@ -1,4 +1,5 @@ """Holds cerberus validation schemals for each yml parsed by any of the sheetwork system.""" + config_schema = { "sheets": { "required": True,