From 9f223dafa3a911199f117a2d2116728b8160ea79 Mon Sep 17 00:00:00 2001 From: Nautics889 Date: Sun, 11 Feb 2024 22:37:58 +0200 Subject: [PATCH 1/2] Docs: Docstrings in checker.py, ast_helpers.py * (docs): update docstrings in `.check_override()`, add missing args description * (docs): update docstring in `maybe_process_conditional_comparison()`, add missings args description --- mypy/checker.py | 17 ++++++++++++----- mypyc/irbuild/ast_helpers.py | 1 + 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/mypy/checker.py b/mypy/checker.py index 391f28e93b1d..58cf974c1957 100644 --- a/mypy/checker.py +++ b/mypy/checker.py @@ -2148,11 +2148,18 @@ def check_override( """Check a method override with given signatures. Arguments: - override: The signature of the overriding method. - original: The signature of the original supertype method. - name: The name of the subtype. This and the next argument are - only used for generating error messages. - supertype: The name of the supertype. + override: The signature of the overriding method. + original: The signature of the original supertype method. + name: The name of the overriding method. + Used for generating error messages only. + name_in_super: The name of the overridden in the superclass. + Used for generating error messages only. + supertype: The name of the supertype. + original_class_or_static: Indicates whether the original method (from the superclass) + is either a class method or a static method. + override_class_or_static: Indicates whether the overriding method (from the subclass) + is either a class method or a static method. + node: Context node. """ # Use boolean variable to clarify code. fail = False diff --git a/mypyc/irbuild/ast_helpers.py b/mypyc/irbuild/ast_helpers.py index 1af1ad611a89..b9ce317f0682 100644 --- a/mypyc/irbuild/ast_helpers.py +++ b/mypyc/irbuild/ast_helpers.py @@ -62,6 +62,7 @@ def maybe_process_conditional_comparison( do nothing and return False. Args: + self: IR form Builder e: Arbitrary expression true: Branch target if comparison is true false: Branch target if comparison is false From 7890edb3bbea99f4e36dee7aaa49175b09dc02d5 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Mon, 8 Apr 2024 00:59:25 -0700 Subject: [PATCH 2/2] Update mypy/checker.py --- mypy/checker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy/checker.py b/mypy/checker.py index 58cf974c1957..b42f45d6daeb 100644 --- a/mypy/checker.py +++ b/mypy/checker.py @@ -2151,7 +2151,7 @@ def check_override( override: The signature of the overriding method. original: The signature of the original supertype method. name: The name of the overriding method. - Used for generating error messages only. + Used primarily for generating error messages. name_in_super: The name of the overridden in the superclass. Used for generating error messages only. supertype: The name of the supertype.