Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of unlocalized modules #160

Open
ChanceNCounter opened this issue Nov 26, 2020 · 0 comments
Open

Improve handling of unlocalized modules #160

ChanceNCounter opened this issue Nov 26, 2020 · 0 comments
Assignees
Labels

Comments

@ChanceNCounter
Copy link
Contributor

At present, if even one module has been localized for a particular language, empty files must be created for the other modules. For instance, Slovenian formatters are going in right now, and an empty parse_sl.py is required. Otherwise, when you try to import lingua_franca.parse, you get ModuleNotFoundError (or whatever Python 3.5 does.)

With the empty file, the module will import fine, and only raise an error - lingua_franca.internal.FunctionNotLocalizedError - under the self-described circumstances.

This should, first of all, raise lingua_franca.internal.NoSuchModuleError, which will descend from ModuleNotFoundError once Py3.5 is dropped.

Second, it should warn, rather than raising the exception, under either of the following circumstances:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant