jesopo
|
faa305f2e8
|
Add -m/-M args to ./start.py that call command_line on individual modules
|
2019-02-24 10:43:46 +00:00 |
|
jesopo
|
8a0fd009e4
|
Also unload submodules within packages (ModuleManager.py)
|
2019-02-22 17:58:53 +00:00 |
|
jesopo
|
f94f233eb3
|
Fix mypy typing issue with importspec loader Optionalness (src/ModuleManager.py)
|
2019-02-06 22:41:37 +00:00 |
|
jesopo
|
c311521a31
|
Switch to using __init__.py as main file of directory modules, so they behave
like a package (also put the modules manually in sys.modules
|
2019-02-05 15:53:11 +00:00 |
|
jesopo
|
607c6eddf9
|
Switch to a non-deprecated method of loading files by filename
(`importlib.util.spec_from_file_location`)
|
2019-02-05 13:34:13 +00:00 |
|
jesopo
|
69edf039b3
|
Support modules being in their own folder and move github.py to github/module.py
|
2019-01-18 12:49:11 +00:00 |
|
jesopo
|
dea63d9cf2
|
By the time we take ref counts, we've already removed module from
`loaded_module`
|
2018-12-09 11:24:05 +00:00 |
|
jesopo
|
8c3f87b029
|
change self.modules to be a dict of str:LoadedModule, not str:BaseModule
|
2018-12-09 11:22:30 +00:00 |
|
jesopo
|
ac71cfa4fa
|
Add missing change to loaded_module.module (from module ) in unload_module
|
2018-12-09 11:20:55 +00:00 |
|
jesopo
|
91beadd1cd
|
def LoadedModule -> class LoadedModule
|
2018-12-09 11:18:55 +00:00 |
|
jesopo
|
6935c926dc
|
Don't store any information used to load/unload modules on the module it's self
thus preventing even the possibility that modules can change them
|
2018-12-09 11:15:04 +00:00 |
|
jesopo
|
9dd9111f85
|
Further clarification of type hints in ModuleManager.py, including now making it
explicit that module objects MUST inherit from BaseModule
|
2018-12-02 16:00:55 +00:00 |
|
jesopo
|
9466f57efc
|
Use getattr to get Module classes out of modules in ModuleManager.py; this
makes more sense and removes some errors from type linting
|
2018-12-02 10:14:18 +00:00 |
|
jesopo
|
8d32fed2fe
|
ModuleWarnings in src/ModuleManger.py should be logged as warn , not error
|
2018-11-26 14:42:41 +00:00 |
|
jesopo
|
8b9062b942
|
Better constifying of color/font chars
|
2018-11-13 16:02:26 +00:00 |
|
jesopo
|
6ca8017966
|
Give Logging.Log object to modules
|
2018-11-05 12:38:40 +00:00 |
|
jesopo
|
e07553c362
|
Add type/return hints throughout src/ and, in doing so, fix some cyclical
references.
|
2018-10-30 14:58:48 +00:00 |
|
jesopo
|
819f4e0680
|
Pass context-wrapped timers to each module, add ModuleManager.BaseModule.on_load
|
2018-10-12 18:07:23 +01:00 |
|
jesopo
|
cb94fa9ae4
|
Add TimersContext, to be able to purge timers when modules are unloaded
|
2018-10-12 17:54:15 +01:00 |
|
jesopo
|
c0fbe963a5
|
Try calling module.unload() (if it exists) when unloading a module
|
2018-10-04 14:45:32 +01:00 |
|
jesopo
|
69d58eede2
|
Move src/Utils.py in to src/utils/, splitting functionality out in to modules of
related functionality
|
2018-10-03 13:22:37 +01:00 |
|
jesopo
|
416d744291
|
Log remaining referrers to a module when it's unloaded
|
2018-09-30 20:12:28 +01:00 |
|
jesopo
|
0f7a122a84
|
Move hashflag parsing to Utils.get_hashflags
|
2018-09-29 09:23:40 +01:00 |
|
jesopo
|
a8bf3c9300
|
Remove cyclical references to IRCBot
|
2018-09-28 16:51:36 +01:00 |
|
jesopo
|
5674dc4a82
|
Open module files explicitly as utf8 in ModuleManager
|
2018-09-27 12:35:09 +01:00 |
|
jesopo
|
8b0314b190
|
Use ModuleManager.BaseModule in more modules
|
2018-09-27 11:46:10 +01:00 |
|
jesopo
|
f3d98d0e95
|
Implement @Utils.export, to denote an export on a module
|
2018-09-27 11:45:23 +01:00 |
|
jesopo
|
ebc77fa501
|
Support using docstrings as command help
|
2018-09-26 15:58:16 +01:00 |
|
jesopo
|
b775f39d2b
|
Add missing format args in ModuleManager exceptions
|
2018-09-26 11:20:18 +01:00 |
|
jesopo
|
39c4ef1749
|
Don't use assert, throw a better exception for module name collisions
|
2018-09-26 11:19:48 +01:00 |
|
jesopo
|
a0b39043c0
|
Use 'bitbot_%s' import name format when unloading a module
|
2018-09-24 16:20:58 +01:00 |
|
jesopo
|
301a973aad
|
Import modules internally as 'bitbot_%s' to avoid name collisions (e.g.
'telegram')
|
2018-09-24 16:15:17 +01:00 |
|
jesopo
|
ecb9d7cb3f
|
Move most code in root directory to src/
|
2018-09-24 15:13:27 +01:00 |
|