|
1 | 1 | # pylint: disable=missing-function-docstring, missing-module-docstring |
2 | | -class FiveArgumentMethods: |
3 | | - """The max positional arguments default is 5.""" |
4 | | - def fail1(self, a, b, c, d, e): # [too-many-arguments, too-many-positional-arguments] |
| 2 | +class RegularMethods: |
| 3 | + """The max positional arguments default is 5. Regular methods don't count `self`.""" |
| 4 | + |
| 5 | + # +1: [too-many-arguments, too-many-positional-arguments] |
| 6 | + def regular_fail1(self, a, b, c, d, e, f): |
5 | 7 | pass |
6 | | - def fail2(self, a, b, c, d, /, e): # [too-many-arguments, too-many-positional-arguments] |
| 8 | + # +1: [too-many-arguments, too-many-positional-arguments] |
| 9 | + def regular_fail2(self, a, b, c, d, e, /, f): |
7 | 10 | pass |
8 | | - def okay1(self, a, b, c, d, *, e=True): # [too-many-arguments] |
| 11 | + # +1: [too-many-arguments, too-many-positional-arguments] |
| 12 | + def regular_fail3(self, /, a, b, c, d, e, f): |
| 13 | + pass |
| 14 | + # +1: [too-many-arguments] |
| 15 | + def regular_soso1(self, a, b, c, d, e, *, f=True): |
| 16 | + pass |
| 17 | + # +1: [too-many-arguments] |
| 18 | + def regular_soso2(self, a, b, c, d, e, /, *, f=True): |
| 19 | + pass |
| 20 | + # +1: [too-many-arguments] |
| 21 | + def regular_soso3(self, /, a, b, c, d, e, *, f=True): |
| 22 | + pass |
| 23 | + # +1: [too-many-arguments] |
| 24 | + def regular_soso4(self, a, b, c, d, e, /, _f, *, g=True): |
| 25 | + pass |
| 26 | + # +1: [too-many-arguments] |
| 27 | + def regular_soso5(self, /, _a, b, c, d, e, f, *, g=True): |
| 28 | + pass |
| 29 | + def regular_okay1(self, a, b, c, d, e): |
| 30 | + pass |
| 31 | + def regular_okay2(self, a, b, c, d, e, /): |
| 32 | + pass |
| 33 | + def regular_okay3(self, *, a, b, c, d, e): |
| 34 | + pass |
| 35 | + def regular_okay4(self, a, b, c, d, e, /, _f): |
| 36 | + pass |
| 37 | + def regular_okay5(self, _a, b, c, d, e, /, f): |
| 38 | + pass |
| 39 | + def regular_okay6(self, /, _a, b, c, d, e, f): |
| 40 | + pass |
| 41 | + def regular_okay7(self, /, a, b, c, d, e, _f): |
| 42 | + pass |
| 43 | + |
| 44 | + |
| 45 | +# pylint: disable=missing-function-docstring, missing-module-docstring |
| 46 | +class StaticMethods: |
| 47 | + """The max positional arguments default is 5. Static methods count them all.""" |
| 48 | + |
| 49 | + @staticmethod |
| 50 | + # +1: [too-many-arguments, too-many-positional-arguments] |
| 51 | + def static_fail1(a, b, c, d, e, f): |
| 52 | + pass |
| 53 | + @staticmethod |
| 54 | + # +1: [too-many-arguments, too-many-positional-arguments] |
| 55 | + def static_fail2(a, b, c, d, e, /, f): |
| 56 | + pass |
| 57 | + @staticmethod |
| 58 | + # +1: [too-many-arguments] |
| 59 | + def static_soso1(a, b, c, d, e, *, f=True): |
| 60 | + pass |
| 61 | + @staticmethod |
| 62 | + # +1: [too-many-arguments] |
| 63 | + def static_soso2(a, b, c, d, e, /, *, f=True): |
| 64 | + pass |
| 65 | + @staticmethod |
| 66 | + # +1: [too-many-arguments] |
| 67 | + def static_soso3(a, b, c, d, e, /, _f, *, g=True): |
| 68 | + pass |
| 69 | + @staticmethod |
| 70 | + def static_okay1(a, b, c, d, e): |
| 71 | + pass |
| 72 | + @staticmethod |
| 73 | + def static_okay2(a, b, c, d, e, /): |
| 74 | + pass |
| 75 | + @staticmethod |
| 76 | + def static_okay3(*, a, b, c, d, e): |
| 77 | + pass |
| 78 | + @staticmethod |
| 79 | + def static_okay4(a, b, c, d, e, /, _f): |
| 80 | + pass |
| 81 | + @staticmethod |
| 82 | + def static_okay5(_a, b, c, d, e, /, f): |
| 83 | + pass |
| 84 | + |
| 85 | + |
| 86 | +# pylint: disable=missing-function-docstring, missing-module-docstring |
| 87 | +class ClassMethods: |
| 88 | + """The max positional arguments default is 5. Class methods don't count `cls`.""" |
| 89 | + |
| 90 | + @classmethod |
| 91 | + # +1: [too-many-arguments, too-many-positional-arguments] |
| 92 | + def class_fail1(cls, a, b, c, d, e, f): |
| 93 | + pass |
| 94 | + @classmethod |
| 95 | + # +1: [too-many-arguments, too-many-positional-arguments] |
| 96 | + def class_fail2(cls, a, b, c, d, e, /, f): |
| 97 | + pass |
| 98 | + @classmethod |
| 99 | + # +1: [too-many-arguments, too-many-positional-arguments] |
| 100 | + def class_fail3(cls, /, a, b, c, d, e, f): |
| 101 | + pass |
| 102 | + @classmethod |
| 103 | + # +1: [too-many-arguments] |
| 104 | + def class_soso1(cls, a, b, c, d, e, *, f=True): |
| 105 | + pass |
| 106 | + @classmethod |
| 107 | + # +1: [too-many-arguments] |
| 108 | + def class_soso2(cls, a, b, c, d, e, /, *, f=True): |
| 109 | + pass |
| 110 | + @classmethod |
| 111 | + # +1: [too-many-arguments] |
| 112 | + def class_soso3(cls, /, a, b, c, d, e, *, f=True): |
| 113 | + pass |
| 114 | + @classmethod |
| 115 | + # +1: [too-many-arguments] |
| 116 | + def class_soso4(cls, a, b, c, d, e, /, _f, *, g=True): |
| 117 | + pass |
| 118 | + @classmethod |
| 119 | + # +1: [too-many-arguments] |
| 120 | + def class_soso5(cls, /, _a, b, c, d, e, f, *, g=True): |
| 121 | + pass |
| 122 | + @classmethod |
| 123 | + def class_okay1(cls, a, b, c, d, e): |
| 124 | + pass |
| 125 | + @classmethod |
| 126 | + def class_okay2(cls, a, b, c, d, e, /): |
| 127 | + pass |
| 128 | + @classmethod |
| 129 | + def class_okay3(cls, *, a, b, c, d, e): |
| 130 | + pass |
| 131 | + @classmethod |
| 132 | + def class_okay4(cls, a, b, c, d, e, /, _f): |
| 133 | + pass |
| 134 | + @classmethod |
| 135 | + def class_okay5(cls, _a, b, c, d, e, /, f): |
| 136 | + pass |
| 137 | + @classmethod |
| 138 | + def class_okay6(cls, /, _a, b, c, d, e, f): |
| 139 | + pass |
| 140 | + @classmethod |
| 141 | + def class_okay7(cls, /, a, b, c, d, e, _f): |
9 | 142 | pass |
0 commit comments