Skip to content

Commit

Permalink
[FIX] incoherent-interpreter-exec-perm: Skip check for windows (#113)
Browse files Browse the repository at this point in the history
Because windows don't have execution permissions like as unix
  • Loading branch information
Jesus Zapata authored and moylop260 committed Feb 7, 2017
1 parent bc1e6f4 commit e2e6f5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pylint_odoo/checkers/format.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

import os
import tokenize
from sys import platform

from pylint.checkers import BaseTokenChecker
from pylint.interfaces import ITokenChecker
Expand Down Expand Up @@ -85,7 +86,8 @@ def process_tokens(self, tokens):
access_x = os.access(self.linter.current_file, os.X_OK)
interpreter_content, line_num = tokens_identified.get(
MAGIC_COMMENT_INTERPRETER, ['', 0])
if bool(interpreter_content) != access_x:
if (not platform.startswith('win') and
bool(interpreter_content) != access_x):
self.add_message(
'incoherent-interpreter-exec-perm',
line=line_num, args=(
Expand Down

0 comments on commit e2e6f5a

Please sign in to comment.