Nanobit commited on
Commit
0dd35c7
1 Parent(s): db288e9

Ignore unsupported-binary-operation

Browse files
Files changed (2) hide show
  1. tests/test_dict.py +3 -1
  2. tests/test_validation.py +7 -7
tests/test_dict.py CHANGED
@@ -48,7 +48,9 @@ class DictDefaultTest(unittest.TestCase):
48
  }
49
  )
50
 
51
- cfg = cfg | DictDefault({"key_a": {"key_b": "value_b"}, "key_f": "value_g"})
 
 
52
 
53
  assert (
54
  cfg.key_a.key_b == "value_b"
 
48
  }
49
  )
50
 
51
+ cfg = cfg | DictDefault( # pylint: disable=unsupported-binary-operation
52
+ {"key_a": {"key_b": "value_b"}, "key_f": "value_g"}
53
+ )
54
 
55
  assert (
56
  cfg.key_a.key_b == "value_b"
tests/test_validation.py CHANGED
@@ -30,7 +30,7 @@ class ValidationTest(unittest.TestCase):
30
  }
31
  )
32
 
33
- cfg = base_cfg | DictDefault(
34
  {
35
  "load_in_8bit": True,
36
  }
@@ -39,7 +39,7 @@ class ValidationTest(unittest.TestCase):
39
  with pytest.raises(ValueError, match=r".*8bit.*"):
40
  validate_config(cfg)
41
 
42
- cfg = base_cfg | DictDefault(
43
  {
44
  "gptq": True,
45
  }
@@ -48,7 +48,7 @@ class ValidationTest(unittest.TestCase):
48
  with pytest.raises(ValueError, match=r".*gptq.*"):
49
  validate_config(cfg)
50
 
51
- cfg = base_cfg | DictDefault(
52
  {
53
  "load_in_4bit": False,
54
  }
@@ -57,7 +57,7 @@ class ValidationTest(unittest.TestCase):
57
  with pytest.raises(ValueError, match=r".*4bit.*"):
58
  validate_config(cfg)
59
 
60
- cfg = base_cfg | DictDefault(
61
  {
62
  "load_in_4bit": True,
63
  }
@@ -73,7 +73,7 @@ class ValidationTest(unittest.TestCase):
73
  }
74
  )
75
 
76
- cfg = base_cfg | DictDefault(
77
  {
78
  "load_in_8bit": True,
79
  }
@@ -82,7 +82,7 @@ class ValidationTest(unittest.TestCase):
82
  with pytest.raises(ValueError, match=r".*8bit.*"):
83
  validate_config(cfg)
84
 
85
- cfg = base_cfg | DictDefault(
86
  {
87
  "gptq": True,
88
  }
@@ -91,7 +91,7 @@ class ValidationTest(unittest.TestCase):
91
  with pytest.raises(ValueError, match=r".*gptq.*"):
92
  validate_config(cfg)
93
 
94
- cfg = base_cfg | DictDefault(
95
  {
96
  "load_in_4bit": True,
97
  }
 
30
  }
31
  )
32
 
33
+ cfg = base_cfg | DictDefault( # pylint: disable=unsupported-binary-operation
34
  {
35
  "load_in_8bit": True,
36
  }
 
39
  with pytest.raises(ValueError, match=r".*8bit.*"):
40
  validate_config(cfg)
41
 
42
+ cfg = base_cfg | DictDefault( # pylint: disable=unsupported-binary-operation
43
  {
44
  "gptq": True,
45
  }
 
48
  with pytest.raises(ValueError, match=r".*gptq.*"):
49
  validate_config(cfg)
50
 
51
+ cfg = base_cfg | DictDefault( # pylint: disable=unsupported-binary-operation
52
  {
53
  "load_in_4bit": False,
54
  }
 
57
  with pytest.raises(ValueError, match=r".*4bit.*"):
58
  validate_config(cfg)
59
 
60
+ cfg = base_cfg | DictDefault( # pylint: disable=unsupported-binary-operation
61
  {
62
  "load_in_4bit": True,
63
  }
 
73
  }
74
  )
75
 
76
+ cfg = base_cfg | DictDefault( # pylint: disable=unsupported-binary-operation
77
  {
78
  "load_in_8bit": True,
79
  }
 
82
  with pytest.raises(ValueError, match=r".*8bit.*"):
83
  validate_config(cfg)
84
 
85
+ cfg = base_cfg | DictDefault( # pylint: disable=unsupported-binary-operation
86
  {
87
  "gptq": True,
88
  }
 
91
  with pytest.raises(ValueError, match=r".*gptq.*"):
92
  validate_config(cfg)
93
 
94
+ cfg = base_cfg | DictDefault( # pylint: disable=unsupported-binary-operation
95
  {
96
  "load_in_4bit": True,
97
  }