diff options
author | Maksym Humetskyi <Humetsky@gmail.com> | 2021-08-17 21:54:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-17 20:54:44 +0200 |
commit | ef72cdc6f9b96ea680d6a9d0f37861f80d6bc3db (patch) | |
tree | a74dec167eccd9cf5b244a07cc685561e26ef500 /tests/input | |
parent | 676f484871a40bd0256e1cc68c28ea748a61acec (diff) | |
download | pylint-git-ef72cdc6f9b96ea680d6a9d0f37861f80d6bc3db.tar.gz |
[duplicate-code] Parse functions and class methods recursively when gathering signature lines (#4858)
* [duplicate-code] Parse functions and class methods recursively when gathering signature lines
Diffstat (limited to 'tests/input')
-rw-r--r-- | tests/input/similar_cls_a.py | 27 | ||||
-rw-r--r-- | tests/input/similar_cls_b.py | 27 |
2 files changed, 54 insertions, 0 deletions
diff --git a/tests/input/similar_cls_a.py b/tests/input/similar_cls_a.py new file mode 100644 index 000000000..9f4e149e2 --- /dev/null +++ b/tests/input/similar_cls_a.py @@ -0,0 +1,27 @@ +class A: + def parent_method( + self, + *, + a="", + b=None, + c=True, + ): + """Overridden method example.""" + + def _internal_func( + arg1: int = 1, + arg2: str = "2", + arg3: int = 3, + arg4: bool = True, + ): + pass + + class InternalA: + def some_method_a( + self, + *, + a=None, + b=False, + c="", + ): + pass diff --git a/tests/input/similar_cls_b.py b/tests/input/similar_cls_b.py new file mode 100644 index 000000000..91df34a38 --- /dev/null +++ b/tests/input/similar_cls_b.py @@ -0,0 +1,27 @@ +class B: + def parent_method( + self, + *, + a="", + b=None, + c=True, + ): + """Overridden method example.""" + + def _internal_func( + arg1: int = 1, + arg2: str = "2", + arg3: int = 3, + arg4: bool = True, + ): + pass + + class InternalB: + def some_method_b( + self, + *, + a=None, + b=False, + c="", + ): + pass |