yeref 0.24.74__tar.gz → 0.24.76__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: yeref
3
- Version: 0.24.74
3
+ Version: 0.24.76
4
4
  Summary: desc-f
5
5
  Author: john smith
6
6
  Dynamic: author
@@ -2,7 +2,7 @@ from setuptools import setup
2
2
 
3
3
  setup(
4
4
  name='yeref',
5
- version='0.24.74',
5
+ version='0.24.76',
6
6
  description='desc-f',
7
7
  author='john smith',
8
8
  packages=['yeref'],
@@ -16496,6 +16496,7 @@ async def return_retention_metrics(bot, PROJECT_USERNAME, EXTRA_D, BASE_P):
16496
16496
  if not cohort_months:
16497
16497
  return
16498
16498
 
16499
+ # Функция прибавления месяцев
16499
16500
  def add_months(mo_str, n):
16500
16501
  y, m = map(int, mo_str.split("-"))
16501
16502
  total = m + n
@@ -16523,12 +16524,15 @@ async def return_retention_metrics(bot, PROJECT_USERNAME, EXTRA_D, BASE_P):
16523
16524
  y1, m1 = map(int, calendar_mo.split("-"))
16524
16525
  offset = (y1 - y0) * 12 + (m1 - m0)
16525
16526
  if offset < 0:
16526
- cell = "0.0"
16527
+ row.append("")
16527
16528
  else:
16528
16529
  rev = rev_by_cohort[c].get(offset, 0.0)
16529
- cell = f"{rev:.1f}"
16530
- row_sum += rev
16531
- row.append(cell)
16530
+ if rev > 0:
16531
+ cell = f"{rev:.1f}"
16532
+ row.append(cell)
16533
+ row_sum += rev
16534
+ else:
16535
+ row.append("")
16532
16536
  row.append(f"{row_sum:.1f}")
16533
16537
  writer.writerow(row)
16534
16538
 
@@ -16539,6 +16543,7 @@ async def return_retention_metrics(bot, PROJECT_USERNAME, EXTRA_D, BASE_P):
16539
16543
  logger.info(log_ % str(e))
16540
16544
  await asyncio.sleep(round(random.uniform(0, 1), 2))
16541
16545
 
16546
+
16542
16547
  # endregion
16543
16548
 
16544
16549
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yeref
3
- Version: 0.24.74
3
+ Version: 0.24.76
4
4
  Summary: desc-f
5
5
  Author: john smith
6
6
  Dynamic: author
File without changes
File without changes
File without changes
File without changes
File without changes