mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-10-14 17:02:17 +00:00
constistent classmethod and staticmethod usage
General idea is to use classmethod for every constructor and statismethod otherwise. Also use self and cls whenever it's possible to call static and class methods
This commit is contained in:
1 parent
d449eb3c2e
commit
880c70bd58
18 files changed
+176
-161
No files matched your search
@@ -14,8 +14,8 @@ def test_from_path(mocker: MockerFixture) -> None:
|
||||
load_logging_mock = mocker.patch("ahriman.core.configuration.Configuration.load_logging")
|
||||
path = Path("path")
|
||||
|
||||
config = Configuration.from_path(path, "x86_64", True)
|
||||
assert config.path == path
|
||||
configuration = Configuration.from_path(path, "x86_64", True)
|
||||
assert configuration.path == path
|
||||
read_mock.assert_called_with(path)
|
||||
load_includes_mock.assert_called_once()
|
||||
load_logging_mock.assert_called_once()
|
||||
|
||||
Reference in new issue
Block a user