Skip to content

Commit

Permalink
type stubs: upgrade for newer stricter mypy 1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Jan 2, 2025
1 parent 4b3079f commit c79809a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
18 changes: 7 additions & 11 deletions contrib/mypy-stubs/pubsub/core/topictreetraverser.pyi
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
from .topicobj import Topic as Topic
from enum import IntEnum

from _typeshed import Incomplete

from .topicobj import Topic
from typing import Optional

class ITopicTreeVisitor: ...

class TreeTraversal(IntEnum):
DEPTH: Incomplete
BREADTH: Incomplete
MAP: Incomplete
DEPTH = 0
BREADTH = 1
MAP = 2

class TopicTreeTraverser:
def __init__(self, visitor: ITopicTreeVisitor = ...) -> None: ...
def __init__(self, visitor: Optional[ITopicTreeVisitor] = None) -> None: ...
def setVisitor(self, visitor: ITopicTreeVisitor) -> None: ...
def traverse(
self, topicObj: Topic, how: TreeTraversal = ..., onlyFiltered: bool = ...
) -> None: ...
def traverse(self, topicObj: Topic, how: TreeTraversal = ..., onlyFiltered: bool = True) -> None: ...
18 changes: 9 additions & 9 deletions src/toil/batchSystems/abstractBatchSystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,23 @@


class BatchJobExitReason(enum.IntEnum):
FINISHED: int = 1
FINISHED = 1
"""Successfully finished."""
FAILED: int = 2
FAILED = 2
"""Job finished, but failed."""
LOST: int = 3
LOST = 3
"""Preemptable failure (job's executing host went away)."""
KILLED: int = 4
KILLED = 4
"""Job killed before finishing."""
ERROR: int = 5
ERROR = 5
"""Internal error."""
MEMLIMIT: int = 6
MEMLIMIT = 6
"""Job hit batch system imposed memory limit."""
MISSING: int = 7
MISSING = 7
"""Job disappeared from the scheduler without actually stopping, so Toil killed it."""
MAXJOBDURATION: int = 8
MAXJOBDURATION = 8
"""Job ran longer than --maxJobDuration, so Toil killed it."""
PARTITION: int = 9
PARTITION = 9
"""Job was not able to talk to the leader via the job store, so Toil declared it failed."""

@classmethod
Expand Down

0 comments on commit c79809a

Please sign in to comment.