(window, month, year, begin_at_sunday_plus)
| 21791 | cur_year = start_year or cur_year |
| 21792 | |
| 21793 | def update_days(window, month, year, begin_at_sunday_plus): |
| 21794 | [window[(week, day)].update('') for day in range(7) for week in range(6)] |
| 21795 | weeks = calendar.monthcalendar(year, month) |
| 21796 | month_days = list(itertools.chain.from_iterable([[0 for _ in range(8 - begin_at_sunday_plus)]] + weeks)) |
| 21797 | if month_days[6] == 0: |
| 21798 | month_days = month_days[7:] |
| 21799 | if month_days[6] == 0: |
| 21800 | month_days = month_days[7:] |
| 21801 | for i, day in enumerate(month_days): |
| 21802 | offset = i |
| 21803 | if offset >= 6 * 7: |
| 21804 | break |
| 21805 | window[(offset // 7, offset % 7)].update(str(day) if day else '') |
| 21806 | |
| 21807 | def make_days_layout(): |
| 21808 | days_layout = [] |
no test coverage detected