Skip to content

Commit

Permalink
Format code with black 25.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoranzo committed Feb 16, 2025
1 parent 0aca5fd commit 7ce76af
Show file tree
Hide file tree
Showing 66 changed files with 68 additions and 101 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/app_unittest_utils/tools_support.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Module contains test fixtures meant to aide in the testing of jobs and
"""Module contains test fixtures meant to aide in the testing of jobs and
tool evaluation. Such extensive "fixtures" are something of an anti-pattern
so use of this should be limited to tests of very 'extensive' classes.
"""
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/datatypes/metadata.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Expose the model metadata module as a datatype module also,
"""Expose the model metadata module as a datatype module also,
allowing it to live in galaxy.model means the model module doesn't
have any dependencies on th datatypes module. This module will need
to remain here for datatypes living in the tool shed so we might as
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/datatypes/text.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
""" Clearing house for generic text datatypes that are not XML or tabular.
"""
"""Clearing house for generic text datatypes that are not XML or tabular."""

import gzip
import json
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/job_execution/output_collect.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
""" Code allowing tools to define extra files associated with an output datset.
"""
"""Code allowing tools to define extra files associated with an output datset."""

import logging
import operator
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/jobs/runners/aws.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
""" Galaxy job runners to use Amazon AWS native compute resources, such as AWS Batch.
"""
"""Galaxy job runners to use Amazon AWS native compute resources, such as AWS Batch."""

import bisect
import hashlib
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/jobs/runners/util/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import json

Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/jobs/stock_rules.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Stock job 'dynamic' rules for use in the job config file - these may cover some
"""Stock job 'dynamic' rules for use in the job config file - these may cover some
simple use cases but will just proxy into functions in rule_helper so similar
functionality - but more tailored and composable can be utilized in custom
rules.
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/model/dataset_collections/structure.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
""" Module for reasoning about structure of and matching hierarchical collections of data.
"""
"""Module for reasoning about structure of and matching hierarchical collections of data."""

import logging

Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/objectstore/caching.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import logging
import os
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/objectstore/s3_boto3.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""A more modern version of the S3 object store based on boto3 instead of boto.
"""
"""A more modern version of the S3 object store based on boto3 instead of boto."""

import logging
import os
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/short_term_storage/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Short Term Storage service for Galaxy.
"""Short Term Storage service for Galaxy.
This service is used to store files for a short period of time (e.g. a few minutes, hours or days)
and then serve them to the client. This is useful for large files that take a long time to
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tool_util/cwl/parser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" This module provides proxy objects around objects from the common
"""This module provides proxy objects around objects from the common
workflow language reference implementation library cwltool. These proxies
adapt cwltool to Galaxy features and abstract the library away from the rest
of the framework.
Expand Down
4 changes: 2 additions & 2 deletions lib/galaxy/tool_util/cwl/representation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
""" This module is responsible for converting between Galaxy's tool
input description and the CWL description for a job json. """
"""This module is responsible for converting between Galaxy's tool
input description and the CWL description for a job json."""

import json
import logging
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tool_util/deps/brew_util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" brew_exts defines generic extensions to Homebrew this file
"""brew_exts defines generic extensions to Homebrew this file
builds on those abstraction and provides Galaxy specific functionality
not useful to the brew external commands.
"""
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tool_util/deps/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def __destination_container(
return container

def container_from_description_from_dicts(
destination_container_dicts: List[Dict[str, Any]]
destination_container_dicts: List[Dict[str, Any]],
) -> Optional[Container]:
for destination_container_dict in destination_container_dicts:
container_description = ContainerDescription.from_dict(destination_container_dict)
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/tool_util/parameters/convert.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Utilities for converting between request states.
"""
"""Utilities for converting between request states."""

import logging
from typing import (
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tool_util/parameters/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ def request_requires_value(self) -> bool:


def cond_test_parameter_default_value(
test_parameter: Union["BooleanParameterModel", "SelectParameterModel"]
test_parameter: Union["BooleanParameterModel", "SelectParameterModel"],
) -> Optional[DiscriminatorType]:
default_value: Optional[DiscriminatorType] = None
if isinstance(test_parameter, BooleanParameterModel):
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/tool_util/parser/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
""" Package responsible for parsing tools from files/abstract tool sources.
"""
"""Package responsible for parsing tools from files/abstract tool sources."""

from .factory import (
get_input_source,
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tool_util/parser/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ def element_to_dict(element_dict):

@staticmethod
def from_dict(
as_dict: Union[AnyTestCollectionDefDict, JsonTestCollectionDefCollectionElementDict]
as_dict: Union[AnyTestCollectionDefDict, JsonTestCollectionDefCollectionElementDict],
) -> "TestCollectionDef":
if "model_class" in as_dict:
xml_as_dict = cast(XmlTestCollectionDefDict, as_dict)
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tool_util/parser/output_collection_def.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" This module define an abstract class for reasoning about Galaxy's
"""This module define an abstract class for reasoning about Galaxy's
dataset collection after jobs are finished.
"""

Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tool_util/verify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ def _parse_label_list(label_list_str: Optional[str]) -> List[int]:


def get_image_metric(
attributes: Dict[str, Any]
attributes: Dict[str, Any],
) -> Callable[["numpy.typing.NDArray", "numpy.typing.NDArray"], "numpy.floating"]:
metric_name = attributes.get("metric", DEFAULT_METRIC)
pin_labels = _parse_label_list(attributes.get("pin_labels", DEFAULT_PIN_LABELS))
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/tools/error_reports/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""This module defines the error reporting framework for Galaxy jobs.
"""
"""This module defines the error reporting framework for Galaxy jobs."""

import collections
import logging
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/tools/error_reports/plugins/base_git.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""This module defines the common functions for error reporting for Galaxy jobs towards Git applications (e.g. Github/GitLab).
"""
"""This module defines the common functions for error reporting for Galaxy jobs towards Git applications (e.g. Github/GitLab)."""

import logging
from abc import (
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tools/recommendations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Compute tool recommendations """
"""Compute tool recommendations"""

import json
import logging
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tools/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ def to_wrapper(
DatasetInstance,
DatasetCollectionInstance,
DatasetCollectionElement,
]
],
) -> DatasetFilenameWrapper:
if isinstance(dataset, DatasetCollectionElement):
dataset2 = dataset.dataset_instance
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/util/facts.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Return various facts for string formatting.
"""
"""Return various facts for string formatting."""

import socket
from collections.abc import MutableMapping
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/util/path/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Path manipulation functions.
"""
"""Path manipulation functions."""

import errno
import importlib
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/util/path/ntpath.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Galaxy "safe" path functions forced to work with Windows-style paths regardless of current platform
"""
"""Galaxy "safe" path functions forced to work with Windows-style paths regardless of current platform"""

import ntpath
import sys
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/util/path/posixpath.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Galaxy "safe" path functions forced to work with POSIX-style paths regardless of current platform
"""
"""Galaxy "safe" path functions forced to work with POSIX-style paths regardless of current platform"""

import posixpath
import sys
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/util/permutations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" There is some shared logic between matching/multiplying inputs in workflows
"""There is some shared logic between matching/multiplying inputs in workflows
and tools. This module is meant to capture some general permutation logic that
can be applicable for both cases but will only be used in the newer tools case
first.
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/util/properties.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Module used to blend ini, environment, and explicit dictionary properties
"""Module used to blend ini, environment, and explicit dictionary properties
to determine application configuration. Some hard coded defaults for Galaxy but
this should be reusable by tool shed and pulsar as well.
"""
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/util/resources.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Provide a consistent interface into and utilities for importlib file resources.
"""
"""Provide a consistent interface into and utilities for importlib file resources."""

import sys

Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/util/script.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Utilities for Galaxy scripts
"""
"""Utilities for Galaxy scripts"""

import argparse
import logging
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/util/validation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Module for validation of incoming inputs.
"""Module for validation of incoming inputs.
TODO: Refactor BaseController references to similar methods to use this module.
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Data providers code for PhyloViz """
"""Data providers code for PhyloViz"""

from typing import (
Any,
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/visualization/tracks/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
""" Summary.py required to be in this module due to pickling. """
"""Summary.py required to be in this module due to pickling."""
3 changes: 1 addition & 2 deletions lib/galaxy/web_stack/transport.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Web application stack operations
"""
"""Web application stack operations"""

import logging
import threading
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/webapps/base/webapp.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import datetime
import inspect
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/webapps/galaxy/api/job_files.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" API for asynchronous job running mechanisms can use to fetch or put files
"""API for asynchronous job running mechanisms can use to fetch or put files
related to running and queued jobs.
"""

Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/webapps/galaxy/api/job_ports.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" API for asynchronous job running mechanisms can use to fetch or put files
"""API for asynchronous job running mechanisms can use to fetch or put files
related to running and queued jobs.
"""

Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/webapps/galaxy/api/job_tokens.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
""" API asynchronous job running mechanisms can use to get a fresh OIDC token.
"""
"""API asynchronous job running mechanisms can use to get a fresh OIDC token."""

import logging

Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/webapps/galaxy/api/tool_entry_points.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" API for asynchronous job running mechanisms can use to fetch or put files
"""API for asynchronous job running mechanisms can use to fetch or put files
related to running and queued jobs.
"""

Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/webapps/reports/controllers/query.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
""" Mixin to help build advanced queries for reports interface.
"""
"""Mixin to help build advanced queries for reports interface."""

import sqlalchemy as sa

Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/workflow/extract.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" This module contains functionality to aid in extracting workflows from
"""This module contains functionality to aid in extracting workflows from
histories.
"""

Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/workflow/reports/generators/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Module containing Galaxy workflow report generator plugins.
"""
"""Module containing Galaxy workflow report generator plugins."""

from abc import (
ABCMeta,
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/workflow/reports/generators/markdown.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""The class defines the default stock Galaxy workflow reporting plugin
"""
"""The class defines the default stock Galaxy workflow reporting plugin"""

import logging
import string
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/workflow/schedulers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Module containing Galaxy workflow scheduling plugins. Galaxy's interface
"""Module containing Galaxy workflow scheduling plugins. Galaxy's interface
for workflow scheduling is highly experimental and the interface required for
scheduling plugins will almost certainly change.
"""
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/workflow/schedulers/core.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" The class defines the stock Galaxy workflow scheduling plugin - currently
"""The class defines the stock Galaxy workflow scheduling plugin - currently
it simply schedules the whole workflow up front when offered.
"""

Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/workflow/steps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" This module contains utility methods for reasoning about and ordering
"""This module contains utility methods for reasoning about and ordering
workflow steps.
"""

Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy_ext/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Package for things which are loaded from outside Galaxy and which we can be
"""Package for things which are loaded from outside Galaxy and which we can be
sure will not conflict with the `galaxy` namespace, which may be provided by
other packages (e.g. galaxy_ops in the toolshed).
"""
2 changes: 1 addition & 1 deletion lib/galaxy_ext/metadata/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
""" Work with Galaxy metadata"""
"""Work with Galaxy metadata"""
3 changes: 1 addition & 2 deletions lib/galaxy_test/base/api_asserts.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Utility methods for making assertions about Galaxy API responses, etc...
"""
"""Utility methods for making assertions about Galaxy API responses, etc..."""

from typing import (
Any,
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy_test/base/env.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Base utilities for working Galaxy test environments.
"""
"""Base utilities for working Galaxy test environments."""

import fcntl
import os
Expand Down
3 changes: 1 addition & 2 deletions lib/tool_shed/test/base/driver.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python
"""Test driver for tool shed functional tests.
"""
"""Test driver for tool shed functional tests."""

import os
import string
Expand Down
2 changes: 1 addition & 1 deletion scripts/apply_tags.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Apply tags to the inherited history items of Galaxy """
"""Apply tags to the inherited history items of Galaxy"""

import sys
import time
Expand Down
2 changes: 1 addition & 1 deletion scripts/galaxy_main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
""" Entry point for starting Galaxy without starting as part of a web server.
"""Entry point for starting Galaxy without starting as part of a web server.

Example Usage: Start a job/workflow handler without a web server and with
a given name using.
Expand Down
3 changes: 1 addition & 2 deletions test/integration/test_scripts.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Integration tests for various scripts in scripts/.
"""
"""Integration tests for various scripts in scripts/."""

import json
import os
Expand Down
3 changes: 1 addition & 2 deletions test/unit/app/managers/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
"""
""" """

import json
from typing import cast
Expand Down
3 changes: 1 addition & 2 deletions test/unit/app/managers/test_CollectionManager.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python
"""
"""
""" """
from galaxy import model
from galaxy.managers.collections import DatasetCollectionManager
from galaxy.managers.datasets import DatasetManager
Expand Down
Loading

0 comments on commit 7ce76af

Please sign in to comment.