MCPcopy
hub / github.com/avinassh/rockstar / _get_dates_list

Method _get_dates_list

rockstar/RockStar.py:75–87  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

73 second=randint(0, 59), microsecond=randint(0, 999999))
74
75 def _get_dates_list(self):
76 def dates():
77 today = date.today()
78 for day_delta in range(self.days):
79 day = today - timedelta(days=day_delta)
80 if day.strftime('%A') in self.days_off:
81 continue
82 if randint(1, 100) < self.off_fraction * 100:
83 continue
84 for i in range(randint(1, 10)):
85 yield day
86 return [datetime.combine(d, self._get_random_time())
87 for d in dates()]
88
89 def make_me_a_rockstar(self):
90 self.repo = git.Repo.init(self.repo_path)

Callers 1

make_me_a_rockstarMethod · 0.95

Calls 1

_get_random_timeMethod · 0.95

Tested by

no test coverage detected