| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ad088ca commit 805fa54
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,12 +19,7 @@ | |||
| 19 | 19 | from functools import cached_property | |
| 20 | 20 | ||
| 21 | 21 | from . import _support as test_support | |
| 22 | - from ._support import ( | ||
| 23 | - OS_ENV_LOCK, | ||
| 24 | - TZPATH_LOCK, | ||
| 25 | - TZPATH_TEST_LOCK, | ||
| 26 | - ZoneInfoTestBase, | ||
| 27 | - ) | ||
| 22 | + from ._support import OS_ENV_LOCK, TZPATH_TEST_LOCK, ZoneInfoTestBase | ||
| 28 | 23 | ||
| 29 | 24 | py_zoneinfo, c_zoneinfo = test_support.get_modules() | |
| 30 | 25 | ||
@@ -365,7 +360,6 @@ def test_folds_and_gaps(self): | |||
| 365 | 360 | self.assertEqual(dt.dst(), offset.dst, dt) | |
| 366 | 361 | ||
| 367 | 362 | def test_folds_from_utc(self): | |
| 368 | - tests = [] | ||
| 369 | 363 | for key in self.zones(): | |
| 370 | 364 | zi = self.zone_from_key(key) | |
| 371 | 365 | with self.subTest(key=key): | |
@@ -927,7 +921,7 @@ def populate_tzstr_header(cls): | |||
| 927 | 921 | # the Version 2+ file. In this case, we have no transitions, just | |
| 928 | 922 | # the tzstr in the footer, so up to the footer, the files are | |
| 929 | 923 | # identical and we can just write the same file twice in a row. | |
| 930 | - for i in range(2): | ||
| 924 | + for _ in range(2): | ||
| 931 | 925 | out += b"TZif" # Magic value | |
| 932 | 926 | out += b"3" # Version | |
| 933 | 927 | out += b" " * 15 # Reserved | |
@@ -952,7 +946,6 @@ def zone_from_tzstr(self, tzstr): | |||
| 952 | 946 | return self.klass.from_file(zonefile, key=tzstr) | |
| 953 | 947 | ||
| 954 | 948 | def test_tzstr_localized(self): | |
| 955 | - i = 0 | ||
| 956 | 949 | for tzstr, cases in self.test_cases.items(): | |
| 957 | 950 | with self.subTest(tzstr=tzstr): | |
| 958 | 951 | zi = self.zone_from_tzstr(tzstr) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -80,7 +80,6 @@ def load_data(fobj): | |||
| 80 | 80 | # not by position in the array but by position in the unsplit | |
| 81 | 81 | # abbreviation string. I suppose this makes more sense in C, which uses | |
| 82 | 82 | # null to terminate the strings, but it's inconvenient here... | |
| 83 | - char_total = 0 | ||
| 84 | 83 | abbr_vals = {} | |
| 85 | 84 | abbr_chars = fobj.read(charcnt) | |
| 86 | 85 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,8 @@ def reset_tzpath(to=None): | |||
| 12 | 12 | f"tzpaths must be a list or tuple, " | |
| 13 | 13 | + f"not {type(tzpaths)}: {tzpaths!r}" | |
| 14 | 14 | ) | |
| 15 | - elif not all(map(os.path.isabs, tzpaths)): | ||
| 15 | + | ||
| 16 | + if not all(map(os.path.isabs, tzpaths)): | ||
| 16 | 17 | raise ValueError(_get_invalid_paths_message(tzpaths)) | |
| 17 | 18 | base_tzpath = tzpaths | |
| 18 | 19 | else: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ | |||
| 4 | 4 | import functools | |
| 5 | 5 | import re | |
| 6 | 6 | import weakref | |
| 7 | - from datetime import datetime, timedelta, timezone, tzinfo | ||
| 7 | + from datetime import datetime, timedelta, tzinfo | ||
| 8 | 8 | ||
| 9 | 9 | from . import _common, _tzpath | |
| 10 | 10 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments