This repository has been archived by the owner on May 16, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
84 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# pylint: skip-file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# W0402(deprecated-module) require module present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,72 @@ | ||
|
||
from openerp.osv import orm, fields | ||
|
||
import os | ||
import os as os2 # W0404 - duplicated import | ||
|
||
import __openerp__ # W0403 - relative import | ||
|
||
# w0402 - deprecated module | ||
import pdb # pylint: disable=W0403 | ||
import pudb # pylint: disable=W0403 | ||
import ipdb # pylint: disable=W0403 | ||
|
||
class TestModel(orm.Model): | ||
|
||
class test_model(orm.Model): | ||
_name = "test.model" | ||
_columns = { | ||
'name': fields.char('Title', 100), | ||
} | ||
|
||
def method_test(self, arg1, arg2): | ||
return None | ||
|
||
def method_e1124(self): | ||
value = self.method_test( | ||
'arg_param1', arg1='arg_param1') | ||
return value | ||
|
||
def method_e1306(self): | ||
return "%s %s" % ('value1') | ||
|
||
def method_e1601(self): | ||
print "Hello world!" | ||
|
||
def method_w0101(self): | ||
return True | ||
return False | ||
|
||
def method_w0102(self, arg1, arg2=[]): | ||
# avoid imported but unused | ||
all_imports = ( | ||
os, os2, __openerp__, pdb, pudb, ipdb) | ||
return all_imports | ||
|
||
def method_w0104_w0105(self): | ||
2*6*0 | ||
"str any effect" | ||
|
||
def method_w0109(self): | ||
my_duplicated_key_dict = { | ||
'key1': 'value1', | ||
'key2': 'value2', | ||
'key1': 'value3', | ||
} | ||
return my_duplicated_key_dict | ||
|
||
def method_w1401(self): | ||
my_regex_str_bad = '\d' | ||
my_regex_str_good = r'\d' | ||
return my_regex_str_bad, my_regex_str_good | ||
|
||
|
||
if __name__ == '__main__': | ||
|
||
def method_w1111(): | ||
return None | ||
|
||
VAR1 = method_w1111() | ||
|
||
class E0101(object): | ||
def __init__(self): | ||
return 'E0101' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# W0402(deprecated-module) require module present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# W0402(deprecated-module) require module present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters