reddit: fix spelling mistakes

This commit is contained in:
Sean Breckenridge 2021-11-02 16:35:25 -07:00 committed by karlicoss
parent d6c484f321
commit d006339ab4
2 changed files with 5 additions and 5 deletions

View file

@ -16,13 +16,13 @@ T = Any
# https://mypy.readthedocs.io/en/latest/generics.html?highlight=decorators#decorator-factories # https://mypy.readthedocs.io/en/latest/generics.html?highlight=decorators#decorator-factories
FactoryF = TypeVar("FactoryF", bound=Callable[..., Iterator[T]]) FactoryF = TypeVar("FactoryF", bound=Callable[..., Iterator[T]])
_DEFUALT_ITR = () _DEFAULT_ITR = ()
# tried to use decorator module but it really doesn't work well # tried to use decorator module but it really doesn't work well
# with types and kw-arguments... :/ # with types and kw-arguments... :/
def import_source( def import_source(
default: Iterable[T] = _DEFUALT_ITR, default: Iterable[T] = _DEFAULT_ITR,
module_name: Optional[str] = None, module_name: Optional[str] = None,
) -> Callable[..., Callable[..., Iterator[T]]]: ) -> Callable[..., Callable[..., Iterator[T]]]:
""" """
@ -50,9 +50,9 @@ def import_source(
suppressed_in_conf = True suppressed_in_conf = True
if not suppressed_in_conf: if not suppressed_in_conf:
if module_name is None: if module_name is None:
warn(f"Module {factory_func.__qualname__} could not be imported, or isn't configured propertly") warn(f"Module {factory_func.__qualname__} could not be imported, or isn't configured properly")
else: else:
warn(f"""Module {module_name} ({factory_func.__qualname__}) could not be imported, or isn't configured propertly\nTo hide this message, add {module_name} to your core config disabled_classes, like: warn(f"""Module {module_name} ({factory_func.__qualname__}) could not be imported, or isn't configured properly\nTo hide this message, add {module_name} to your core config disabled_classes, like:
class core: class core:
disabled_modules = [{repr(module_name)}] disabled_modules = [{repr(module_name)}]

View file

@ -1,5 +1,5 @@
""" """
This is here temporarily, for backwards compatability purposes This is here temporarily, for backwards compatibility purposes
It should be removed in the future, and you should replace any imports It should be removed in the future, and you should replace any imports
like: like:
from my.reddit import ... from my.reddit import ...