Skip to content

[bug] load_file silently fails when non-string path is passed #1299

@rochacbruno

Description

@rochacbruno

Found by @TheRealHaoLiu

What happens:

from foo import module_object

settings.load_file(module_object)
NOTHING

Expected:

from foo import module_object

settings.load_file(module_object)
TypeError: path must be a `str` not a `module`

Alternatives for discussion:

  • Should load_file take a module and internally call inpect.getfile to figure out the real path?
  • Should a load_module be added?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions