what's meaning of `# noqa`?

asked 2017-09-04 06:52:24 -0600

liaodalin19903 gravatar image

I found after every import *, there is a # noqa.

from keystoneauth1.loading.base import *  # noqa
from keystoneauth1.loading import cli
from keystoneauth1.loading import conf
from keystoneauth1.loading.identity import *  # noqa
from keystoneauth1.loading.opts import *  # noqa
from keystoneauth1.loading import session

So, what's meaning of it?
Have any special meaning?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-09-04 07:27:01 -0600


# noqa is used to ignore warnings during flake8 python unit tests, is common to see those # noqa in subproccess or multiprocessor declarations.

In this case, the warnings is for * in imports as they are not safe/recommended to use.

More info about flake8 ignoring errors http://flake8.pycqa.org/en/latest/user/violations.html#selecting-and-ignoring-violations


edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2017-09-04 06:52:24 -0600

Seen: 626 times

Last updated: Sep 04 '17