non-ascii-module-import / C2403#

Message emitted:

%s name "%s" contains a non-ASCII character, use an ASCII-only alias for import.


Used when the name contains at least one non-ASCII unicode character. See for a background why this could be bad. If your programming guideline defines that you are programming in English, then there should be no need for non ASCII characters in Python Names. If not you can simply disable this check.

Problematic code:

from os.path import join as łos  # [non-ascii-module-import]

foo = łos("a", "b")

Correct code:

from os.path import join as os_join

foo = os_join("a", "b")

Created by the nonascii-checker checker.