jesopo
|
7a15e5b2bf
|
store timestamp and current git commit when loading a module
|
2020-02-03 23:00:53 +00:00 |
|
jesopo
|
341b314104
|
change command specs to be compiled at runtime by a decorator
|
2020-01-25 14:01:11 +00:00 |
|
jesopo
|
a7e21abfad
|
import missing comma, 'Events'->'Event'
|
2019-11-18 12:10:20 +00:00 |
|
jesopo
|
06161b326c
|
remove unused imports in src/utils/__init__.py
|
2019-11-18 12:09:18 +00:00 |
|
jesopo
|
9c4902dcfe
|
"EventsResultsError"->"EventResultsError", move errors to utils.error
|
2019-11-18 12:06:59 +00:00 |
|
jesopo
|
5d01db8514
|
move all datetime-related code from utils/__init__ to utils.datetime
|
2019-11-15 13:59:09 +00:00 |
|
jesopo
|
5e8cf06a45
|
dont expose has_magic/get_magic in utils/__init__.py, ref directly
|
2019-11-15 13:41:03 +00:00 |
|
jesopo
|
bfcf40edd7
|
split some stuff out of utils/__init__.py
|
2019-11-15 13:39:24 +00:00 |
|
jesopo
|
2cb55306c3
|
show first-words datestamp on !words output
|
2019-11-15 12:13:16 +00:00 |
|
jesopo
|
2b001e1ec6
|
' ' -> " "
|
2019-10-31 13:06:26 +00:00 |
|
Valentin Lorentz
|
fbf8cd1a16
|
Fix type errors detected by 'mypy --ignore-missing-imports src'.
|
2019-10-30 22:26:59 +01:00 |
|
jesopo
|
3634b72622
|
add utils.date_human() - use it in badges.py
|
2019-10-30 10:25:07 +00:00 |
|
jesopo
|
080bcef3a0
|
'from src.utils import' -> 'from . import'
|
2019-10-29 18:02:50 +00:00 |
|
jesopo
|
2c19bdb949
|
add a fairly basic file locking mechanism with src/LockFile.py
closes #96
|
2019-10-10 12:11:03 +01:00 |
|
jesopo
|
68aa89f16f
|
commit FunctionSetting changes i forgot to commit yesterday
|
2019-10-08 11:38:56 +01:00 |
|
jesopo
|
3466a3c43e
|
Allow utils.Setting_ parse functions to throw detailed errors
|
2019-10-04 10:25:48 +01:00 |
|
jesopo
|
a003c97fba
|
move q.close() to where it will be called even if deadline is hit
|
2019-09-18 10:24:01 +01:00 |
|
jesopo
|
dce6eee8c9
|
move _raise_deadline() out of except block to clean up printed stacktrace
|
2019-09-18 10:21:40 +01:00 |
|
jesopo
|
fa95eaa9eb
|
add .get() to CaseInsensitiveDict
|
2019-09-17 13:40:37 +01:00 |
|
jesopo
|
d454f9b732
|
use Queue.get() with timeout, not Process.join() for timeout
this was because the threads spawned by multiprocessing.Queue seemed to be
making Process.join() believe the subprocess had not exited.
|
2019-09-17 13:39:23 +01:00 |
|
jesopo
|
1ed14f9a17
|
first draft of multiprocess.Process deadline system
|
2019-09-17 11:56:30 +01:00 |
|
jesopo
|
f9d13dc373
|
support '0' as an IntSetting value
|
2019-09-15 22:22:30 +01:00 |
|
jesopo
|
d950eb3660
|
add utils.SensitiveSetting, to .format() hide value
|
2019-09-12 12:17:31 +01:00 |
|
jesopo
|
ba0911f2e7
|
add utils.Setting.format() so subtypes can format differently
|
2019-09-12 12:17:09 +01:00 |
|
jesopo
|
007bb78d30
|
make utils.from_pretty_time() format much stricter
|
2019-09-04 11:22:56 +01:00 |
|
jesopo
|
d42d694e64
|
move deadline alarm time check inside try/finally
|
2019-09-02 15:50:12 +01:00 |
|
jesopo
|
9e43ea1599
|
add per-user fediverse setting
|
2019-09-02 08:51:56 +01:00 |
|
jesopo
|
722d6418c8
|
switch to using signal.setitimer so we can restore previous timer
|
2019-08-30 18:36:48 +01:00 |
|
jesopo
|
a57a06b1cc
|
switch utils.deadline to a context manager
|
2019-08-30 18:13:12 +01:00 |
|
jesopo
|
e97e3c8f30
|
add utils.deadline(func, seconds) to put hard limits on code exec time
|
2019-08-30 17:17:03 +01:00 |
|
jesopo
|
4bfb4c3200
|
Add IntRangeSetting, reorder OptionsSetting arg order
|
2019-08-30 14:40:54 +01:00 |
|
jesopo
|
58a4fd7e74
|
round microseconds up to a whole number and zero-pad to 3 chars
|
2019-08-30 13:46:00 +01:00 |
|
jesopo
|
d3ed08e336
|
Don't use 'Z' for "utc timezone" - actually parse timezone out of datetimes
|
2019-08-30 13:25:19 +01:00 |
|
jesopo
|
77dfc76591
|
switch to function/module magic being a single object
|
2019-07-26 11:58:06 +01:00 |
|
jesopo
|
19f716ab4c
|
Implemnt _options_factory for OptionsSetting to have dynamic options
|
2019-06-29 22:26:28 +01:00 |
|
jesopo
|
b4c762eb4e
|
Automatically format example text for OptionsSetting (showing options)
|
2019-06-29 21:33:26 +01:00 |
|
jesopo
|
7091860e54
|
Setting.__init__ call in OptionsSetting ctor needs self param
|
2019-06-28 23:27:56 +01:00 |
|
jesopo
|
756396d758
|
Implement utils.OptionsSetting
|
2019-06-28 23:26:42 +01:00 |
|
jesopo
|
ae9d099a41
|
Refactor set/channelset/serverset/botset in to 'utils.Setting' objects
|
2019-06-28 23:16:05 +01:00 |
|
jesopo
|
3c3f0449b6
|
add CaseInsensitiveDict.__contains__
|
2019-06-26 17:57:49 +01:00 |
|
jesopo
|
c5785a2d14
|
implement @utils.kwarg() magic, use it for command.regex hooks
|
2019-06-26 14:37:41 +01:00 |
|
jesopo
|
ced59a0f74
|
Allow channel-access and channel-mode check for channels people are not in
|
2019-06-16 20:48:31 +01:00 |
|
jesopo
|
8ab4880c5c
|
Change from yield checks to a func in events that pass up EventErrors
|
2019-06-15 18:42:14 +01:00 |
|
jesopo
|
e0d99fe8b1
|
Fix utils.Check args type hinting
|
2019-06-14 12:12:38 +01:00 |
|
jesopo
|
f05fc209b0
|
Add a way to __or__ utils.Check s, as a "if one of these passes" thing
|
2019-06-14 12:01:55 +01:00 |
|
jesopo
|
d7fa2cfa24
|
Catch yield s in command callbacks for e.g. permission checks
|
2019-06-14 11:42:12 +01:00 |
|
jesopo
|
0afe798b83
|
Support parsing iso8601 with microseconds
|
2019-04-28 12:11:48 +01:00 |
|
jesopo
|
e095c56f77
|
Record and show when a !to was created
|
2019-04-24 14:32:56 +01:00 |
|
jesopo
|
87340bcbf9
|
change utils.iso8601_format to default to no milliseconds, switch to using
utils.iso8601 functions in badges.py
|
2019-04-23 21:27:43 +01:00 |
|
jesopo
|
0eaeca8f83
|
Put spaces between units in output from utils.to_pretty_time
|
2019-03-21 17:59:42 +00:00 |
|