Skip to content

Commit

Permalink
Updated conformance tests for pyright 1.1.356 and pytype 2024.03.19. … (
Browse files Browse the repository at this point in the history
python#1668)

Updated conformance tests for pyright 1.1.356 and pytype 2024.03.19. No changes to the conformance results, but a small code change was needed to the tests for pytype, and a few of the error messages changed for pyright.
  • Loading branch information
erictraut authored Mar 28, 2024
1 parent 1006bed commit 2ec8230
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion conformance/results/mypy/version.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "mypy 1.9.0"
test_duration = 1.4
test_duration = 2.0
2 changes: 1 addition & 1 deletion conformance/results/pyre/version.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "pyre 0.9.19"
test_duration = 4.0
test_duration = 5.3
2 changes: 1 addition & 1 deletion conformance/results/pyright/aliases_type_statement.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ aliases_type_statement.py:19:1 - error: Object of type "TypeAliasType" is not ca
aliases_type_statement.py:23:18 - error: Cannot access member "other_attrib" for type "TypeAliasType"
  Member "other_attrib" is unknown (reportAttributeAccessIssue)
aliases_type_statement.py:26:18 - error: A type alias defined in a "type" statement cannot be used as a base class
aliases_type_statement.py:31:22 - error: Argument of type "GoodAlias1" cannot be assigned to parameter "__class_or_tuple" of type "_ClassInfo" in function "isinstance"
aliases_type_statement.py:31:22 - error: Argument of type "GoodAlias1" cannot be assigned to parameter "class_or_tuple" of type "_ClassInfo" in function "isinstance"
  Type "TypeAliasType" cannot be assigned to type "_ClassInfo"
    "TypeAliasType" is incompatible with "type"
    "TypeAliasType" is incompatible with "UnionType"
Expand Down
4 changes: 2 additions & 2 deletions conformance/results/pyright/generics_basic.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ generics_basic.py:48:49 - error: TypeVar constraint type cannot be generic
generics_basic.py:59:15 - error: Argument of type "bytes" cannot be assigned to parameter "y" of type "AnyStr@concat" in function "concat"
  "bytes" is incompatible with "str" (reportArgumentType)
generics_basic.py:107:24 - error: Type arguments for "Generic" must be unique
generics_basic.py:140:5 - error: Argument of type "Literal[0]" cannot be assigned to parameter "__key" of type "str" in function "__getitem__"
generics_basic.py:140:5 - error: Argument of type "Literal[0]" cannot be assigned to parameter "key" of type "str" in function "__getitem__"
  "Literal[0]" is incompatible with "str" (reportArgumentType)
generics_basic.py:141:5 - error: Argument of type "Literal[0]" cannot be assigned to parameter "__key" of type "str" in function "__getitem__"
generics_basic.py:141:5 - error: Argument of type "Literal[0]" cannot be assigned to parameter "key" of type "str" in function "__getitem__"
  "Literal[0]" is incompatible with "str" (reportArgumentType)
generics_basic.py:167:37 - error: Metaclass cannot be generic (reportGeneralTypeIssues)
"""
3 changes: 2 additions & 1 deletion conformance/results/pyright/protocols_definition.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ protocols_definition.py:289:22 - error: Expression of type "Concrete5_Bad5" cann
protocols_definition.py:339:22 - error: Expression of type "Concrete6_Bad1" cannot be assigned to declared type "Template6"
  "Concrete6_Bad1" is incompatible with protocol "Template6"
    "val1" is an incompatible type
      Property setter method is missing (reportAssignmentType)
      Property setter method is missing
        "Template6" is incompatible with "Concrete6_Bad1" (reportAssignmentType)
protocols_definition.py:340:22 - error: Expression of type "Concrete6_Bad2" cannot be assigned to declared type "Template6"
  "Concrete6_Bad2" is incompatible with protocol "Template6"
    "val1" is writable in protocol (reportAssignmentType)
Expand Down
3 changes: 2 additions & 1 deletion conformance/results/pyright/qualifiers_final_decorator.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ qualifiers_final_decorator.py:89:9 - error: Method "method" cannot override fina
qualifiers_final_decorator.py:102:9 - error: Method "method" cannot override final method defined in class "Base4" (reportIncompatibleMethodOverride)
qualifiers_final_decorator.py:118:9 - error: Method "method" cannot override final method defined in class "Base5_2" (reportIncompatibleMethodOverride)
qualifiers_final_decorator.py:118:9 - error: Method "method" overrides class "Base5_2" in an incompatible manner
  Positional parameter count mismatch; base method has 2, but override has 1 (reportIncompatibleMethodOverride)
  Positional parameter count mismatch; base method has 2, but override has 1
  Parameter 2 mismatch: base parameter "v" is keyword parameter, override parameter is position-only (reportIncompatibleMethodOverride)
qualifiers_final_decorator.py:126:5 - error: Function "func1" cannot be marked @final because it is not a method (reportGeneralTypeIssues)
"""
2 changes: 1 addition & 1 deletion conformance/results/pyright/version.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "pyright 1.1.354"
version = "pyright 1.1.356"
test_duration = 1.5
4 changes: 2 additions & 2 deletions conformance/results/pytype/version.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "pytype 2024.03.11"
test_duration = 40.0
version = "pytype 2024.03.19"
test_duration = 34.2
2 changes: 1 addition & 1 deletion conformance/results/results.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion conformance/src/type_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pytype import config as pytype_config
from pytype import io as pytype_io
from pytype import analyze as pytype_analyze
from pytype import errors as pytype_errors
from pytype.errors import errors as pytype_errors
from pytype import load_pytd as pytype_loader
from shutil import rmtree
from subprocess import PIPE, run
Expand Down

0 comments on commit 2ec8230

Please sign in to comment.