moexapi 1.7.9__tar.gz → 1.7.11__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moexapi
3
- Version: 1.7.9
3
+ Version: 1.7.11
4
4
  Summary: Python API for MOEX ISS
5
5
  Author-email: Aliaksei Rak <kventinel@gmail.com>
6
6
  License: MIT License
@@ -119,7 +119,10 @@ class Bond:
119
119
  if item not in self.coupons:
120
120
  self.coupons.append(item)
121
121
  for line in offers:
122
- date = datetime.date.fromisoformat(line["offerdate"])
122
+ offer_date = line.get("offerdate")
123
+ if not offer_date or offer_date == "0000-00-00":
124
+ continue
125
+ date = datetime.date.fromisoformat(offer_date)
123
126
  end_date = _max(end_date, date)
124
127
  item = Offer(date=date, value=line["value"])
125
128
  if item not in self.offers:
@@ -241,6 +241,8 @@ class Ticker:
241
241
  board_info = TickerBoardInfo.from_secid(listing.secid, listing.market, listing.board)
242
242
  if board_info is not None:
243
243
  for key, value in dataclasses.asdict(board_info).items():
244
+ if value is None:
245
+ continue
244
246
  if getattr(result, key, None) is None or getattr(result, key, None) == []:
245
247
  setattr(result, key, value)
246
248
  elif getattr(result, key) != value:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moexapi
3
- Version: 1.7.9
3
+ Version: 1.7.11
4
4
  Summary: Python API for MOEX ISS
5
5
  Author-email: Aliaksei Rak <kventinel@gmail.com>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "moexapi"
7
- version = "1.7.9"
7
+ version = "1.7.11"
8
8
  description = "Python API for MOEX ISS"
9
9
  readme = "README.md"
10
10
  authors = [{ name = "Aliaksei Rak", email = "kventinel@gmail.com" }]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes