datedict 0.1.5__py3-none-any.whl → 0.1.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of datedict might be problematic. Click here for more details.

datedict/DateDict.py CHANGED
@@ -8,6 +8,9 @@ from .common import NAN, ONE, Decimable, to_decimal, ZERO
8
8
  class DateDict:
9
9
  def __init__(self, data: Mapping[str, Decimable] = dict(), strict: bool = True):
10
10
  dates = sorted(data.keys())
11
+ if len(dates) == 0:
12
+ self.data = {}
13
+ return
11
14
  if strict:
12
15
  # enforce contiguous coverage
13
16
  if dates != [
datedict/YearDict.py CHANGED
@@ -7,6 +7,9 @@ from .common import NAN, ONE, Decimable, to_decimal, ZERO
7
7
  class YearDict:
8
8
  def __init__(self, data: Mapping[int, Decimable] = dict(), strict: bool = True):
9
9
  years = sorted(data.keys())
10
+ if len(years) == 0:
11
+ self.data = {}
12
+ return
10
13
  if strict:
11
14
  # enforce contiguous coverage
12
15
  if years != list(range(years[0], years[-1] + 1)):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datedict
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: DateDict and YearDict: date-aware dictionary structures
5
5
  Project-URL: Homepage, https://gitlab.com/grisus/datedict
6
6
  Project-URL: Issues, https://gitlab.com/grisus/datedict/-/issues
@@ -0,0 +1,8 @@
1
+ datedict/DateDict.py,sha256=DdzGhURzOOE13GvNHoKQ28bb-crgE3bGhtUqjaok23Y,7775
2
+ datedict/YearDict.py,sha256=avVXgCp_zgSL5khqCjR6Z5vh-vqFwEdK-5TO9wfhjfc,5493
3
+ datedict/__init__.py,sha256=4QSCqCW_owSqD3k3Oz1WAsB4p_vvzUlINroAxxFCEWQ,201
4
+ datedict/common.py,sha256=aUCsMV6roKGQIQXSFIJIN0cxAXIlK_YyRDWS1EIBu8E,424
5
+ datedict-0.1.6.dist-info/METADATA,sha256=2toUqZh5PzbRriZJiFYEimotLxkZLHU0OxvWGRY8YZY,1991
6
+ datedict-0.1.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
+ datedict-0.1.6.dist-info/licenses/LICENSE,sha256=GMmiaNfJSsljmGtIp9lCY6V-Dkc9NDZn0jSZuAbFe7Y,1070
8
+ datedict-0.1.6.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- datedict/DateDict.py,sha256=E697A7QgjQMwwHqcMsRVTCjWzZLw8sovHZG9caOw5CQ,7701
2
- datedict/YearDict.py,sha256=xwVhMLklo7RjCChPsmSQ63pXaqbeAfIVe_zDnGZOIcQ,5419
3
- datedict/__init__.py,sha256=4QSCqCW_owSqD3k3Oz1WAsB4p_vvzUlINroAxxFCEWQ,201
4
- datedict/common.py,sha256=aUCsMV6roKGQIQXSFIJIN0cxAXIlK_YyRDWS1EIBu8E,424
5
- datedict-0.1.5.dist-info/METADATA,sha256=RVL0i2_rKRaDv7aTLHnvDVnPK0SjWm7VrAZ7s7pQV90,1991
6
- datedict-0.1.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
- datedict-0.1.5.dist-info/licenses/LICENSE,sha256=GMmiaNfJSsljmGtIp9lCY6V-Dkc9NDZn0jSZuAbFe7Y,1070
8
- datedict-0.1.5.dist-info/RECORD,,