mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-01 15:37:32 +08:00
Type annotation fixes for mypy 2.2.0
and cloudbridge 4.2.0 .
This commit is contained in:
@@ -18,8 +18,8 @@ try:
|
||||
)
|
||||
from cloudbridge.interfaces.exceptions import InvalidNameException
|
||||
except ImportError:
|
||||
CloudProviderFactory = None
|
||||
ProviderList = None
|
||||
CloudProviderFactory = None # type: ignore[assignment,misc,unused-ignore]
|
||||
ProviderList = None # type: ignore[assignment,misc,unused-ignore]
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -30,9 +30,8 @@ NoneType = type(None)
|
||||
SampleSheetColumnValueT = int | float | bool | str | NoneType
|
||||
|
||||
|
||||
# type ignore because mypy can't handle closed TypedDicts yet
|
||||
@with_config(ConfigDict(extra="forbid"))
|
||||
class SampleSheetColumnDefinition(TypedDict, closed=True): # type: ignore[call-arg]
|
||||
class SampleSheetColumnDefinition(TypedDict, closed=True):
|
||||
name: str
|
||||
description: NotRequired[str | None]
|
||||
type: SampleSheetColumnType
|
||||
|
||||
@@ -252,9 +252,8 @@ CwlType = Literal["File", "null", "boolean", "int", "float", "string"]
|
||||
FieldType = CwlType | list[CwlType]
|
||||
|
||||
|
||||
# type ignore because mypy can't handle closed TypedDicts yet
|
||||
@with_config(ConfigDict(extra="forbid"))
|
||||
class FieldDict(TypedDict, closed=True): # type: ignore[call-arg]
|
||||
class FieldDict(TypedDict, closed=True):
|
||||
name: str
|
||||
type: FieldType
|
||||
format: NotRequired[str | None]
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
# For dev
|
||||
mypy
|
||||
|
||||
# For release
|
||||
build
|
||||
twine==6.2.0
|
||||
|
||||
+1
-1
@@ -174,7 +174,7 @@ dev = [
|
||||
typecheck = [
|
||||
"boto3-stubs[s3]",
|
||||
"lxml-stubs",
|
||||
"mypy",
|
||||
"mypy>=2.2.0", # support for closed TypedDicts
|
||||
"pydantic>=2.7.4", # for pydantic.mypy plugin
|
||||
"types-bleach",
|
||||
"types-boto",
|
||||
|
||||
Reference in New Issue
Block a user