Skip to content

Commit

Permalink
Merge pull request OCA#593 from vauxoo-dev/master-oca-disable-print-moy
Browse files Browse the repository at this point in the history
[REF] pylint.cfg: Enable print-used instead of print-statement check
  • Loading branch information
pedrobaeza authored Mar 23, 2019
2 parents d4a0645 + 692ab9e commit e7595f0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ matrix:
- python: 3.5
env:
VERSION="" TESTS="0" LINT_CHECK="1"
PYLINT_EXPECTED_ERRORS="35"
PYLINT_EXPECTED_ERRORS="36"
- python: 3.7-dev
env:
VERSION="" TESTS="0" LINT_CHECK="1"
PYLINT_EXPECTED_ERRORS="35"
PYLINT_EXPECTED_ERRORS="36"
- python: 3.5
env:
VERSION="11.0" ODOO_REPO="OCA/OCB" TESTS="1" LINT_CHECK="0"
Expand Down
7 changes: 7 additions & 0 deletions tests/test_repo/broken_module/model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# missing coding
import unittest

from openerp.osv import orm
from openerp import fields

Expand Down Expand Up @@ -54,6 +56,11 @@ def method_w1401(self):
my_regex_str_good = r'\d'
return my_regex_str_bad, my_regex_str_good

# Reproduce issue https://github.com/OCA/pylint-odoo/issues/243
@unittest.skipIf(lambda self: self.method_w1401(), "")
def my_method(self):
pass


if __name__ == '__main__':

Expand Down
2 changes: 1 addition & 1 deletion travis/cfg/travis_run_pylint.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ enable=anomalous-backslash-in-string,
missing-manifest-dependency,
pointless-statement,
pointless-string-statement,
print-statement,
print-used,
redundant-keyword-arg,
reimported,
relative-import,
Expand Down
3 changes: 1 addition & 2 deletions travis/self_tests
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ EXPECTED_ERRORS = {
'duplicate-key': 2,
'pointless-statement': 1,
'pointless-string-statement': 1,
'print-statement': 1,
'print-used': 1,
'redundant-keyword-arg': 1,
'reimported': 4,
'return-in-init': 1,
Expand All @@ -60,7 +60,6 @@ if PY3K:
EXPECTED_ERRORS.update({
'assignment-from-none': 2,
})
EXPECTED_ERRORS.pop('print-statement')

@contextlib.contextmanager
def _patch_streams(out):
Expand Down

0 comments on commit e7595f0

Please sign in to comment.