Small changes.
authorScott Gasch <[email protected]>
Mon, 21 Mar 2022 18:45:22 +0000 (11:45 -0700)
committerScott Gasch <[email protected]>
Mon, 21 Mar 2022 18:45:22 +0000 (11:45 -0700)
arper.py
constants.py

index 2ef2676ab88ce42223b5c80ffc3fcbd038cb15fa..4f362f4157369415511f8a648f6105f1de26498a 100644 (file)
--- a/arper.py
+++ b/arper.py
@@ -41,7 +41,7 @@ cfg.add_argument(
 cfg.add_argument(
     '--arper_cache_max_staleness',
     type=argparse_utils.valid_duration,
-    default=datetime.timedelta(seconds=60 * 15),
+    default=datetime.timedelta(seconds=60 * 30),
     metavar='DURATION',
     help='Max acceptable age of the kernel arp table cache',
 )
index fdc533bff82d0a51c2e39ee666ae60882ee6597f..934edb292ce6c7f21c1ded775091a82f902c9538 100644 (file)
@@ -2,24 +2,19 @@
 
 """Universal constants."""
 
+from typing import Final
+
 # This module is commonly used by others in here and should avoid
 # taking any unnecessary dependencies back on them.
 
 # Date/time based constants
-SECONDS_PER_MINUTE = 60
-SECONDS_PER_HOUR = 60 * SECONDS_PER_MINUTE
-SECONDS_PER_DAY = 24 * SECONDS_PER_HOUR
-SECONDS_PER_WEEK = 7 * SECONDS_PER_DAY
-MINUTES_PER_HOUR = 60
-MINUTES_PER_DAY = 24 * MINUTES_PER_HOUR
-MINUTES_PER_WEEK = 7 * MINUTES_PER_DAY
-HOURS_PER_DAY = 24
-HOURS_PER_WEEK = 7 * HOURS_PER_DAY
-DAYS_PER_WEEK = 7
-DATETIME_WEEKDAY_MONDAY = 0
-DATETIME_WEEKDAY_TUEDAY = 0
-DATETIME_WEEKDAY_WEDNESDAY = 0
-DATETIME_WEEKDAY_THURSDAY = 0
-DATETIME_WEEKDAY_FRIDAY = 0
-DATETIME_WEEKDAY_SATURDAY = 0
-DATETIME_WEEKDAY_SUNDAY = 0
+SECONDS_PER_MINUTE: Final = 60
+SECONDS_PER_HOUR: Final = 60 * SECONDS_PER_MINUTE
+SECONDS_PER_DAY: Final = 24 * SECONDS_PER_HOUR
+SECONDS_PER_WEEK: Final = 7 * SECONDS_PER_DAY
+MINUTES_PER_HOUR: Final = 60
+MINUTES_PER_DAY: Final = 24 * MINUTES_PER_HOUR
+MINUTES_PER_WEEK: Final = 7 * MINUTES_PER_DAY
+HOURS_PER_DAY: Final = 24
+HOURS_PER_WEEK: Final = 7 * HOURS_PER_DAY
+DAYS_PER_WEEK: Final = 7