Permalink
Browse files

Merge pull request #2 from mreiferson/master

ghetto pyflakes.skip
  • Loading branch information...
2 parents 036511d + 5e77515 commit 98e69754dff8b0224662b498728fd83b0d30ed07 @jehiah committed Mar 28, 2012
Showing with 7 additions and 2 deletions.
  1. +1 −1 pyflakes/__init__.py
  2. +5 −0 pyflakes/scripts/pyflakes.py
  3. +1 −1 setup.py
View
@@ -1,2 +1,2 @@
-__version__ = '0.4.0a'
+__version__ = '0.4.0b'
@@ -27,6 +27,11 @@ def check(codeString, filename, options):
"""
# First, compile into an AST and handle syntax errors.
try:
+ f = open(filename, 'r')
+ if any([True for x in xrange(2) if '# pyflakes.skip' in f.readline()]):
+ f.close()
+ return 0
+ f.close()
tree = compile(codeString, filename, "exec", _ast.PyCF_ONLY_AST)
except SyntaxError, value:
msg = value.args[0]
View
@@ -6,7 +6,7 @@
setup(
name="pyflakes",
license="MIT",
- version="0.4.0a",
+ version="0.4.0b",
description="passive checker of Python programs",
author="Phil Frost",
maintainer="Moe Aboulkheir",

0 comments on commit 98e6975

Please sign in to comment.