Ask Your Question

what's meaning of `# noqa`?

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

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 -0500


# 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


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 -0500

Seen: 717 times

Last updated: Sep 04 '17