Skip to content

Commit

Permalink
[REF] attribute-deprecated: Deprecate length class attribute (#86)
Browse files Browse the repository at this point in the history
* [REF] attribute-deprecated: Deprecate length class attribute
Related issue: OCA/maintainer-quality-tools#385 and odoo/odoo#13780

* [REF] .travis.yml: Disable F999

Disable the error: "dictionary key 'name' repeated with  different value"
This error is duplicated from pylint.
  • Loading branch information
moylop260 authored and pedrobaeza committed Nov 26, 2016
1 parent 7b89e5a commit 57fa5a7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ install:
- pip install tox

script:
- flake8 --exclude=__init__.py .
- flake8 --ignore=F999 --exclude=__init__.py .
- tox -e $TOXENV,profile-stats

after_success:
Expand Down
2 changes: 1 addition & 1 deletion pylint_odoo/checkers/no_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
'Other OSI approved licence', 'Other proprietary',
]
DFTL_ATTRIBUTE_DEPRECATED = [
'_columns', '_defaults',
'_columns', '_defaults', 'length',
]
DFTL_METHOD_REQUIRED_SUPER = [
'create', 'write', 'read', 'unlink', 'copy',
Expand Down
2 changes: 1 addition & 1 deletion pylint_odoo/test/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
EXPECTED_ERRORS = {
'api-one-deprecated': 4,
'api-one-multi-together': 2,
'attribute-deprecated': 2,
'attribute-deprecated': 3,
'class-camelcase': 1,
'consider-merging-classes-inherited': 2,
'copy-wo-api-one': 2,
Expand Down
1 change: 1 addition & 0 deletions pylint_odoo/test_repo/broken_module/models/broken_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class TestModel(models.Model):

_columns = {} # deprecated columns
_defaults = {} # deprecated defaults
length = fields.Integer() # Deprecated length by js errors

name = fields.Char(
_(u"Näme"), # Don't need translate
Expand Down

0 comments on commit 57fa5a7

Please sign in to comment.