Skip to content

Commit

Permalink
Fix black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
swainn committed May 28, 2024
1 parent 4010f32 commit a7957a6
Show file tree
Hide file tree
Showing 117 changed files with 149 additions and 14 deletions.
1 change: 1 addition & 0 deletions tests/unit_tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""

import uuid
import factory
from unittest import mock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""

from tethys_sdk.testing import TethysTestCase
from tethys_apps.models import (
TethysApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""

from tethys_apps.base.testing.testing import TethysTestCase
from tethys_compute.models import Scheduler, CondorScheduler

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""

from tethys_sdk.testing import TethysTestCase
from tethys_compute.models.dask.dask_scheduler import DaskScheduler
from tethys_compute.models.dask.dask_job import DaskJob
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""

from tethys_apps.base.testing.testing import TethysTestCase
from tethys_compute.models import Scheduler, DaskScheduler
from unittest import mock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""

import unittest
import tethys_gizmos.gizmo_options.base as basetest

Expand Down
1 change: 1 addition & 0 deletions tethys_apps/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

import json
import logging
from django import forms
Expand Down
1 change: 1 addition & 0 deletions tethys_apps/app_installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

import os


Expand Down
1 change: 1 addition & 0 deletions tethys_apps/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

import sys
from django.apps import AppConfig

Expand Down
1 change: 1 addition & 0 deletions tethys_apps/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

# DO NOT ERASE
from tethys_apps.base.app_base import TethysAppBase, TethysExtensionBase # noqa: F401
from tethys_apps.base.bokeh_handler import with_request, with_workspaces # noqa: F401
Expand Down
1 change: 1 addition & 0 deletions tethys_apps/base/bokeh_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

# Native Imports
from functools import wraps

Expand Down
9 changes: 5 additions & 4 deletions tethys_apps/base/handoff.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

import inspect
import json
from django.shortcuts import redirect
Expand Down Expand Up @@ -124,10 +125,10 @@ def handoff(
json.dumps(error), content_type="application/javascript"
)

error[
"message"
] = "HTTP 400 Bad Request: No handoff handler '{0}' for app '{1}' found.".format(
manager.app.name, handler_name
error["message"] = (
"HTTP 400 Bad Request: No handoff handler '{0}' for app '{1}' found.".format(
manager.app.name, handler_name
)
)
return HttpResponseBadRequest(
json.dumps(error), content_type="application/javascript"
Expand Down
1 change: 1 addition & 0 deletions tethys_apps/base/url_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

DEFAULT_EXPRESSION = r"[0-9A-Za-z-_.]+"


Expand Down
1 change: 1 addition & 0 deletions tethys_apps/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

from tethys_apps.utilities import get_active_app
from tethys_portal.dependencies import vendor_static_dependencies

Expand Down
1 change: 1 addition & 0 deletions tethys_apps/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License:
********************************************************************************
"""

from functools import wraps
from urllib.parse import urlparse

Expand Down
7 changes: 4 additions & 3 deletions tethys_apps/harvester.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

import inspect
import logging
import pkgutil
Expand Down Expand Up @@ -208,9 +209,9 @@ def _harvest_extension_instances(self, extension_packages):
# compile valid apps
if validated_ext_instance:
valid_ext_instances.append(validated_ext_instance)
valid_extension_modules[
extension_name
] = extension_package
valid_extension_modules[extension_name] = (
extension_package
)

# Notify user that the app has been loaded
loaded_extensions.append(extension_name)
Expand Down
1 change: 1 addition & 0 deletions tethys_apps/management/commands/collectworkspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

import os
import shutil

Expand Down
1 change: 1 addition & 0 deletions tethys_apps/management/commands/pre_collectstatic.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

import os
import shutil

Expand Down
1 change: 1 addition & 0 deletions tethys_apps/management/commands/syncstores.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

from django.core.management.base import BaseCommand
from tethys_cli.cli_colors import TC_BLUE, TC_WARNING, TC_ENDC

Expand Down
1 change: 1 addition & 0 deletions tethys_apps/management/commands/tethys_app_uninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

import os
import site
import subprocess
Expand Down
1 change: 1 addition & 0 deletions tethys_apps/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

from django.dispatch import receiver
import logging
import uuid
Expand Down
1 change: 1 addition & 0 deletions tethys_apps/static_finders.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License:
********************************************************************************
"""

import os
from collections import OrderedDict as SortedDict
from django.contrib.staticfiles import utils
Expand Down
1 change: 1 addition & 0 deletions tethys_apps/template_loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License:
********************************************************************************
"""

import io
import errno
from django.core.exceptions import SuspiciousFileOperation
Expand Down
1 change: 1 addition & 0 deletions tethys_apps/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

import logging
from django.urls import include, re_path
from channels.routing import URLRouter
Expand Down
1 change: 1 addition & 0 deletions tethys_apps/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

import importlib
import logging
import os
Expand Down
1 change: 1 addition & 0 deletions tethys_apps/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

import logging
from django.shortcuts import render
from django.http import HttpResponse, JsonResponse
Expand Down
1 change: 1 addition & 0 deletions tethys_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

# Commandline interface for Tethys
import argparse

Expand Down
1 change: 1 addition & 0 deletions tethys_cli/db_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

from pathlib import Path
import shutil
import argparse
Expand Down
1 change: 1 addition & 0 deletions tethys_cli/docker_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

import os
import json
from abc import ABC, abstractmethod
Expand Down
1 change: 1 addition & 0 deletions tethys_cli/gen_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

import json
import os
import string
Expand Down
1 change: 1 addition & 0 deletions tethys_cli/settings_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

from pathlib import Path
from pprint import pformat
from argparse import Namespace
Expand Down
1 change: 1 addition & 0 deletions tethys_compute/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
* License: BSD 2-Clause
********************************************************************************
"""

default_app_config = "tethys_compute.apps.TethysComputeConfig"
1 change: 1 addition & 0 deletions tethys_compute/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

from django.contrib import admin
from django.utils.html import format_html
from django import forms
Expand Down
1 change: 1 addition & 0 deletions tethys_compute/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

from django.apps import AppConfig


Expand Down
1 change: 1 addition & 0 deletions tethys_compute/job_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

import logging


Expand Down
1 change: 1 addition & 0 deletions tethys_compute/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License: BSD 2-Clause
********************************************************************************
"""

from django.dispatch import receiver
from django.db.models.signals import post_save

Expand Down
1 change: 1 addition & 0 deletions tethys_compute/models/basic_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""

from tethys_compute.models.tethys_job import TethysJob


Expand Down
1 change: 1 addition & 0 deletions tethys_compute/models/condor/condor_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""

import os
from abc import abstractmethod
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions tethys_compute/models/condor/condor_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""

import shutil
import logging

Expand Down
1 change: 1 addition & 0 deletions tethys_compute/models/condor/condor_py_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""

from tethys_portal.optional_dependencies import optional_import
import os

Expand Down
1 change: 1 addition & 0 deletions tethys_compute/models/condor/condor_py_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""

from tethys_portal.optional_dependencies import optional_import

from django.db import models
Expand Down
1 change: 1 addition & 0 deletions tethys_compute/models/condor/condor_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""

from django.db import models
from tethys_compute.models.scheduler import Scheduler

Expand Down
1 change: 1 addition & 0 deletions tethys_compute/models/condor/condor_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""

import shutil
import logging
import os
Expand Down
1 change: 1 addition & 0 deletions tethys_compute/models/condor/condor_workflow_job_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""

from django.db.models.signals import pre_save
from django.dispatch import receiver

Expand Down
1 change: 1 addition & 0 deletions tethys_compute/models/condor/condor_workflow_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""

from abc import abstractmethod

from django.db import models
Expand Down
1 change: 1 addition & 0 deletions tethys_compute/models/dask/dask_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""

import logging
import datetime
import json
Expand Down
Loading

0 comments on commit a7957a6

Please sign in to comment.