Ask Your Question
0

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
1

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

Hi,

# 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

Regards

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 316 times

Last updated: Sep 04 '17