2 Commits

Author SHA1 Message Date
relikd
1df0bf95c0 chore: bump version 1.0.2 2022-07-22 19:42:34 +02:00
relikd
0e5ef41ea9 fix(cron): assert callback is set 2022-07-22 19:35:04 +02:00
3 changed files with 2 additions and 13 deletions

View File

@@ -2,15 +2,3 @@ dist: setup.py botlib/*
@echo Building...
python3 setup.py sdist bdist_wheel
rm -rf ./*.egg-info/ ./build/ MANIFEST
env-publish:
@echo Creating virtual environment...
@python3 -m venv 'env-publish'
@source env-publish/bin/activate && pip install twine
.PHONY: publish
publish: dist env-publish
[ -z "$${VIRTUAL_ENV}" ] # you can not do this inside a virtual environment.
@echo Publishing...
@echo "\033[0;31mEnter PyPI token in password prompt:\033[0m"
@source env-publish/bin/activate && export TWINE_USERNAME='__token__' && twine upload dist/*

View File

@@ -1,7 +1,7 @@
'''
Collection of tools to streamline data format conversion.
'''
__version__ = '1.0.1'
__version__ = '1.0.2'
# import sys
# if __name__ != '__main__':

View File

@@ -61,6 +61,7 @@ class Cron:
def add_job(self, interval: int, callback: CronCallback, arg: Any = None) \
-> Job:
''' Create and queue a new job. '''
assert callback and callable(callback), 'No Cron callback provided.'
job = Cron.Job(interval, callback, arg)
self.push(job)
return job