Skip to content

Commit

Permalink
Update to black 2024 stable style
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoranzo committed Jan 30, 2024
1 parent 96420f7 commit e34b63a
Show file tree
Hide file tree
Showing 35 changed files with 43 additions and 13 deletions.
1 change: 1 addition & 0 deletions bioblend/_tests/TestGalaxyGroups.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
WARNING: only admins can operate on groups!
"""

import uuid

from . import GalaxyTestBase
Expand Down
1 change: 1 addition & 0 deletions bioblend/_tests/TestGalaxyHistories.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""
"""

import os
import shutil
import tarfile
Expand Down
1 change: 1 addition & 0 deletions bioblend/_tests/TestGalaxyInstance.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Tests on the GalaxyInstance object itself.
"""

import os
import time
import unittest
Expand Down
1 change: 1 addition & 0 deletions bioblend/_tests/TestGalaxyToolContainerResolution.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test functions in bioblend.galaxy.container_resolution
"""

from . import (
GalaxyTestBase,
test_util,
Expand Down
1 change: 1 addition & 0 deletions bioblend/_tests/TestGalaxyToolDependencies.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test functions in bioblend.galaxy.tool_dependencies
"""

from . import (
GalaxyTestBase,
test_util,
Expand Down
1 change: 1 addition & 0 deletions bioblend/_tests/TestGalaxyTools.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""
"""

import os
from typing import (
Any,
Expand Down
1 change: 1 addition & 0 deletions bioblend/_tests/test_util.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
""" General support infrastructure not tied to any particular test.
"""

import os
import random
import string
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
A base representation of an instance of Galaxy
"""

from typing import Optional

from bioblend.galaxy import (
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Contains possible interaction dealing with Galaxy configuration.
"""

from typing import TYPE_CHECKING

from bioblend.galaxy.client import Client
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/container_resolution/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Contains interactions dealing with Galaxy container resolvers.
Works only with Galaxy > 22.01
"""

from typing import (
List,
Optional,
Expand Down
7 changes: 3 additions & 4 deletions bioblend/galaxy/datasets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Contains possible interactions with the Galaxy Datasets
"""

import logging
import os
import shlex
Expand Down Expand Up @@ -99,8 +100,7 @@ def download_dataset(
use_default_filename: bool = True,
require_ok_state: bool = True,
maxwait: float = 12000,
) -> bytes:
...
) -> bytes: ...

@overload
def download_dataset(
Expand All @@ -110,8 +110,7 @@ def download_dataset(
use_default_filename: bool = True,
require_ok_state: bool = True,
maxwait: float = 12000,
) -> str:
...
) -> str: ...

def download_dataset(
self,
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/datatypes/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Contains possible interactions with the Galaxy Datatype
"""

from typing import (
Dict,
List,
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/folders/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Contains possible interactions with the Galaxy library folders
"""

from typing import (
Any,
Dict,
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/forms/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Contains possible interactions with the Galaxy Forms
"""

from typing import (
Any,
Dict,
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/ftpfiles/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Contains possible interactions with the Galaxy FTP Files
"""

from typing import (
List,
TYPE_CHECKING,
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/genomes/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Contains possible interactions with the Galaxy Histories
"""

from typing import (
Any,
Dict,
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/groups/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Contains possible interactions with the Galaxy Groups
"""

from typing import (
Any,
Dict,
Expand Down
7 changes: 3 additions & 4 deletions bioblend/galaxy/histories/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Contains possible interactions with the Galaxy Histories
"""

import logging
import re
import sys
Expand Down Expand Up @@ -270,8 +271,7 @@ def show_history(
self,
history_id: str,
contents: Literal[False] = False,
) -> Dict[str, Any]:
...
) -> Dict[str, Any]: ...

@overload
def show_history(
Expand All @@ -282,8 +282,7 @@ def show_history(
visible: Optional[bool] = None,
details: Optional[str] = None,
types: Optional[List[str]] = None,
) -> List[Dict[str, Any]]:
...
) -> List[Dict[str, Any]]: ...

# Fallback in case the caller provides a regular bool as contents
@overload
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/invocations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Contains possible interactions with the Galaxy workflow invocations
"""

import logging
import time
from typing import (
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/jobs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Contains possible interactions with the Galaxy Jobs
"""

import logging
import time
from typing import (
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/libraries/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Contains possible interactions with the Galaxy Data Libraries
"""

import logging
import time
from typing import (
Expand Down
7 changes: 3 additions & 4 deletions bioblend/galaxy/objects/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Classes in this module should not be instantiated directly, but used
via their handles in :class:`~.galaxy_instance.GalaxyInstance`.
"""

import abc
import json
from collections.abc import Sequence
Expand Down Expand Up @@ -498,12 +499,10 @@ class ObjDatasetClient(ObjClient):
"""

@overload
def get(self, id_: str, hda_ldda: Literal["hda"] = "hda") -> wrappers.HistoryDatasetAssociation:
...
def get(self, id_: str, hda_ldda: Literal["hda"] = "hda") -> wrappers.HistoryDatasetAssociation: ...

@overload
def get(self, id_: str, hda_ldda: Literal["ldda"]) -> wrappers.LibraryDatasetDatasetAssociation:
...
def get(self, id_: str, hda_ldda: Literal["ldda"]) -> wrappers.LibraryDatasetDatasetAssociation: ...

def get(self, id_: str, hda_ldda: HdaLdda = "hda") -> wrappers.Dataset:
"""
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/roles/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Contains possible interactions with the Galaxy Roles
"""

from typing import (
Any,
Dict,
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/tool_data/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Contains possible interactions with the Galaxy Tool data tables
"""

from typing import (
Any,
Dict,
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/tool_dependencies/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Contains interactions dealing with Galaxy dependency resolvers.
"""

from typing import (
Any,
Dict,
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Contains possible interaction dealing with Galaxy tools.
"""

from os.path import basename
from typing import (
Any,
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/users/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Most of these methods must be executed by a registered Galaxy admin user.
"""

from typing import (
Any,
Dict,
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/visual/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Contains possible interactions with the Galaxy visualization
"""

from typing import (
Any,
Dict,
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxy/workflows/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Contains possible interactions with the Galaxy Workflows
"""

import json
import os
from typing import (
Expand Down
1 change: 1 addition & 0 deletions bioblend/galaxyclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
should not use it directly.
A base representation of an instance
"""

import base64
import contextlib
import json
Expand Down
1 change: 1 addition & 0 deletions bioblend/toolshed/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
A base representation of an instance of Tool Shed
"""

from typing import Optional

from bioblend.galaxyclient import GalaxyClient
Expand Down
1 change: 1 addition & 0 deletions bioblend/toolshed/categories/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Interaction with a Tool Shed instance categories
"""

from typing import (
Any,
Dict,
Expand Down
1 change: 1 addition & 0 deletions bioblend/toolshed/repositories/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Interaction with a Tool Shed instance repositories
"""

from typing import (
Any,
Dict,
Expand Down
1 change: 1 addition & 0 deletions bioblend/toolshed/tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Interaction with a Tool Shed instance tools
"""

from typing import (
Any,
Dict,
Expand Down
4 changes: 3 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ exclude =
build
# E203 is whitespace before ':'; we follow black's formatting here. See https://black.readthedocs.io/en/stable/faq.html#why-are-flake8-s-e203-and-w503-violated
# E501 is line length, managed by black
# E701,E704 are multiple statements on one line; we follow black's formatting here. See https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#configuration
# SFS3 is string literal formatting using f-strings
# W503 is line breaks before binary operators, which has been reversed in PEP 8.
ignore = E203,E501,E741,SFS3,W503
ignore = E203,E501,E701,E704,SFS3,W503

[metadata]
author = Enis Afgan
Expand Down

0 comments on commit e34b63a

Please sign in to comment.