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

Locally supressing code analysis warnings #655

Closed
spyder-bot opened this issue Feb 17, 2015 · 7 comments
Closed

Locally supressing code analysis warnings #655

spyder-bot opened this issue Feb 17, 2015 · 7 comments

Comments

@spyder-bot
Copy link
Collaborator

From bgbg...@gmail.com on 2011-05-15T03:30:58Z

Consider the following code

exec('anotherFile.py') #defines a variable called v
v += 10 # pyflake marks this line: "undefined name v"

In this code a variable "v" was created by an exec call. Subsequent calls to "v" invoke code analysis error messages. Would be nice to be able to do something like this (inspired by the syntax suggested here: http://djangosnippets.org/snippets/1762/ ):

exec('anotherFile.py')
v += 10 #pyflake:ignore

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=655

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2011-05-15T08:15:53Z

It seems and interesting enhancement.

Labels: -Type-Defect Type-Enhancement

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-05-16T01:32:35Z

Labels: Cat-Editor

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-05-22T09:46:22Z

Thanks for this excellent suggestion.

Status: Accepted

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-05-22T09:47:26Z

This issue was closed by revision 60d4f14c8805 .

Status: Fixed

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-05-22T09:47:37Z

This issue was closed by revision 92f857dafd4d .

@spyder-bot
Copy link
Collaborator Author

From steve.f....@gmail.com on 2011-05-23T09:31:40Z

Is there a similar construct for pylint?

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-05-23T09:58:14Z

Of course, see for example: https://code.google.com/p/spyderlib/source/browse/spyderlib/widgets/dicteditor.py#14

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

No branches or pull requests

2 participants