Skip to content

Commit

Permalink
Use typing.OrderedDict for type hints
Browse files Browse the repository at this point in the history
We get an error when using collections.OrderedDict
  • Loading branch information
jamesmishra committed Feb 25, 2022
1 parent 1826a1b commit 925f91a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pel/core.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""The Pel Graph, Task, and ArgParser models."""
import argparse
import collections
import threading
from collections import OrderedDict
from enum import Enum, auto
from typing import (
Any,
Expand All @@ -10,6 +10,7 @@
List,
Mapping,
Optional,
OrderedDict,
Sequence,
Set,
Type,
Expand Down Expand Up @@ -139,7 +140,7 @@ def _get_needs_map(
self, end_task_names: Union[Sequence[str], str] = ""
) -> OrderedDict[str, Set[str]]:
"""Return a dict mapping task names to their dependencies' names."""
needs_map: OrderedDict[str, Set[str]] = OrderedDict()
needs_map: OrderedDict[str, Set[str]] = collections.OrderedDict()
if end_task_names:
tasks = self._get_recursive_need_names(end_task_names)
else:
Expand Down

0 comments on commit 925f91a

Please sign in to comment.