Add a simple test for waitable presence.
[python_utils.git] / string_utils.py
index 3ae9eeae96141fce9d4bb17516a5bace6ceb8b6f..ec662d234d8afa788cce2779e51f51622bc2862e 100644 (file)
@@ -142,16 +142,16 @@ MARGIN_RE = re.compile(r"^[^\S\r\n]+")
 ESCAPE_SEQUENCE_RE = re.compile(r"\e\[[^A-Za-z]*[A-Za-z]")
 
 NUM_SUFFIXES = {
-    "Pb": (1024 ** 5),
-    "P": (1024 ** 5),
-    "Tb": (1024 ** 4),
-    "T": (1024 ** 4),
-    "Gb": (1024 ** 3),
-    "G": (1024 ** 3),
-    "Mb": (1024 ** 2),
-    "M": (1024 ** 2),
-    "Kb": (1024 ** 1),
-    "K": (1024 ** 1),
+    "Pb": (1024**5),
+    "P": (1024**5),
+    "Tb": (1024**4),
+    "T": (1024**4),
+    "Gb": (1024**3),
+    "G": (1024**3),
+    "Mb": (1024**2),
+    "M": (1024**2),
+    "Kb": (1024**1),
+    "K": (1024**1),
 }
 
 
@@ -1075,7 +1075,7 @@ def to_date(in_str: str) -> Optional[datetime.date]:
     """
     Parses a date string.  See DateParser docs for details.
     """
-    import dateparse.dateparse_utils as dp  # type: ignore
+    import dateparse.dateparse_utils as dp
 
     try:
         d = dp.DateParser()