diff --git a/src/banks/config.py b/src/banks/config.py index c7594dc..65262c4 100644 --- a/src/banks/config.py +++ b/src/banks/config.py @@ -29,7 +29,7 @@ def __getattribute__(self, name: str) -> Any: # Convert string from env var to the actual type t = super().__getattribute__("__annotations__")[name] - if t == bool: + if t is bool: return strtobool(read_value) return t(read_value) diff --git a/tests/test_env.py b/tests/test_env.py index 9c1482c..f75b727 100644 --- a/tests/test_env.py +++ b/tests/test_env.py @@ -7,4 +7,4 @@ def test_default_loader(): - assert type(env.loader) == PackageLoader + assert type(env.loader) is PackageLoader diff --git a/tests/test_loader.py b/tests/test_loader.py index dd743c0..89707a5 100644 --- a/tests/test_loader.py +++ b/tests/test_loader.py @@ -13,10 +13,10 @@ def test_defaults(): test_loader = MultiLoader() assert len(test_loader._loaders) == 2 loader, prio = test_loader._loaders[0] - assert type(loader) == PackageLoader + assert type(loader) is PackageLoader assert prio == 10 loader, prio = test_loader._loaders[1] - assert type(loader) == FileSystemLoader + assert type(loader) is FileSystemLoader assert prio == 20