From 90e0af88b936cbce0464798ce7ca681b50ee0ad0 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Fri, 26 Jun 2020 16:38:08 +0000 Subject: [PATCH] Fix return type of get_module_{class,instance} No need to quote the class name since the methods are not inside the class (anymore) --- codearchiver/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codearchiver/core.py b/codearchiver/core.py index 9bcd54d..f8df532 100644 --- a/codearchiver/core.py +++ b/codearchiver/core.py @@ -138,7 +138,7 @@ class Module: return f'{type(self).__module__}.{type(self).__name__}({self._inputUrl!r})' -def get_module_class(inputUrl: InputURL) -> typing.Type['Module']: +def get_module_class(inputUrl: InputURL) -> typing.Type[Module]: '''Get the Module class most suitable for handling `inputUrl`.''' # Ensure that modules are imported @@ -167,6 +167,6 @@ def get_module_class(inputUrl: InputURL) -> typing.Type['Module']: raise RuntimeError('No matching modules for input URL') -def get_module_instance(inputUrl: InputURL, **kwargs) -> 'Module': +def get_module_instance(inputUrl: InputURL, **kwargs) -> Module: '''Get an instance of the Module class most suitable for handling `inputUrl`.''' return get_module_class(inputUrl)(inputUrl, **kwargs)