Skip to content

Commit

Permalink
Merge pull request #53 from keyan/python_compat
Browse files Browse the repository at this point in the history
Add <=python3.7 compatibility
  • Loading branch information
AndreaCensi authored May 22, 2021
2 parents 49c156b + 67c883f commit 79d1c5b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ pyrender
colorama
coloredlogs
aido-protocols-daffy

# Allow compatibility with Python versions < 3.8
typing_extensions
9 changes: 8 additions & 1 deletion src/duckietown_world/world_duckietown/old_map_format.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
from typing import Dict, List, NewType, TypedDict, Union
import sys

if sys.version_info >= (3, 8):
from typing import TypedDict # pylint: disable=no-name-in-module
else:
from typing_extensions import TypedDict

from typing import Dict, List, NewType, Union

__all__ = ["MapFormat1", "MapFormat1Object", "MapFormat1Constants"]

Expand Down

0 comments on commit 79d1c5b

Please sign in to comment.