mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 03:24:20 +00:00
🔧 Fix scroll class initialization
This commit is contained in:
parent
f13ea127e6
commit
f36d82397a
2 changed files with 10 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
|||
[tool.poetry]
|
||||
name = "royalnet"
|
||||
version = "6.0.0a13"
|
||||
version = "6.0.0a14"
|
||||
description = "A multipurpose bot and web framework"
|
||||
authors = ["Stefano Pigozzi <ste.pigozzi@gmail.com>"]
|
||||
license = "AGPL-3.0-or-later"
|
||||
|
|
|
@ -55,14 +55,6 @@ class Scroll:
|
|||
config = json.load(file)
|
||||
return cls(namespace, config)
|
||||
|
||||
loaders = {
|
||||
".json": from_json,
|
||||
".toml": from_toml,
|
||||
}
|
||||
"""
|
||||
An extension to deserialization function map.
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def from_file(cls, namespace: str, file_path: os.PathLike, require_file: bool = False) -> Scroll:
|
||||
"""
|
||||
|
@ -134,4 +126,13 @@ class Scroll:
|
|||
return self._get_from_config(item)
|
||||
|
||||
|
||||
Scroll.loaders = {
|
||||
".json": Scroll.from_json,
|
||||
".toml": Scroll.from_toml,
|
||||
}
|
||||
"""
|
||||
An extension to deserialization function map.
|
||||
"""
|
||||
|
||||
|
||||
__all__ = ("Scroll",)
|
||||
|
|
Loading…
Reference in a new issue