Further de-linting of zoneinfo module (GH-20499)
* Remove unused imports in zoneinfo
* Remove unused variables in zoneinfo
* Remove else after raise
(cherry picked from commit 364b5ead1584583db91ef7f9d9f87f01bfbb5774)
Co-authored-by: Paul Ganssle <paul@ganssle.io>
diff --git a/Lib/zoneinfo/_tzpath.py b/Lib/zoneinfo/_tzpath.py
index 9e381b6..9513611 100644
--- a/Lib/zoneinfo/_tzpath.py
+++ b/Lib/zoneinfo/_tzpath.py
@@ -12,7 +12,8 @@
f"tzpaths must be a list or tuple, "
+ f"not {type(tzpaths)}: {tzpaths!r}"
)
- elif not all(map(os.path.isabs, tzpaths)):
+
+ if not all(map(os.path.isabs, tzpaths)):
raise ValueError(_get_invalid_paths_message(tzpaths))
base_tzpath = tzpaths
else: