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

[FIX] Skip incoherent-interpreter-exec-perm: Skip check for Windows #113

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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