|
1 | 1 | # pylint: disable=missing-docstring,invalid-name
|
2 | 2 |
|
| 3 | +# Content of bad/good.py |
3 | 4 | mindless_anarchy = 1504e5 # [bad-float-notation]
|
4 | 5 | scientific_notation = 1.504e8
|
5 | 6 | engineering_notation = 150.4e6
|
6 | 7 | underscore_notation = 150_400_000
|
7 | 8 |
|
| 9 | +# Content of pep515 strict tests tested with default configuration |
| 10 | +not_grouped_by_three = 1_23_456_7_89 # [bad-float-notation] |
| 11 | +mixing_with_exponent = 1_23_4_5_67_8e9 # [bad-float-notation] |
| 12 | +above_threshold_without_grouping = 123456789 # [bad-float-notation] |
| 13 | +proper_grouping = 123_456_789 |
| 14 | +scientific_notation_2 = 1.2345678e16 |
| 15 | +engineering_notation_2 = 12.345678e15 |
| 16 | + |
| 17 | +# Content of bad_float_engineering_notation.py strict tests tested with default configuration |
| 18 | +exponent_not_multiple_of_three = 123e4 # [bad-float-notation] |
| 19 | +base_not_between_one_and_a_thousand = 12345e6 # [bad-float-notation] |
| 20 | +above_threshold_without_exponent = 10000000 # [bad-float-notation] |
| 21 | +under_a_thousand_with_exponent = 9.9e2 # [bad-float-notation] |
| 22 | +exponent_multiple_of_three = 1.23e6 |
| 23 | +base_between_one_and_a_thousand = 12.345e9 |
| 24 | +under_a_thousand = 990 |
| 25 | + |
| 26 | +# Content of bad_float_scientific_notation strict tests tested with default configuration |
| 27 | +base_not_between_one_and_ten = 10e3 # [bad-float-notation] |
| 28 | +above_threshold_without_exponent_2 = 10000000 # [bad-float-notation] |
| 29 | +under_ten_with_exponent = 9.9e0 # [bad-float-notation] |
| 30 | +base_between_one_and_ten = 1e4 |
| 31 | +above_threshold_with_exponent = 1e7 |
| 32 | +under_ten = 9.9 |
| 33 | + |
| 34 | + |
8 | 35 | wrong_big = 45.3e6 # [bad-float-notation]
|
9 | 36 | uppercase_e_wrong = 45.3E6 # [bad-float-notation]
|
10 | 37 | wrong_small = 0.00012e-26 # [bad-float-notation]
|
|
0 commit comments