Skip to content

Partly addressed inconsistency between override validation and protoc…#10215

Merged
erictraut merged 1 commit intomainfrom
protoRegression
Mar 30, 2025
Merged

Partly addressed inconsistency between override validation and protoc…#10215
erictraut merged 1 commit intomainfrom
protoRegression

Conversation

@erictraut
Copy link
Copy Markdown
Collaborator

…ol matching introduced in recent change.

@github-actions
Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

sympy (https://github.com/sympy/sympy)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:358:36 - error: Cannot access attribute "diff" for class "Relational"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:358:36 - error: Cannot access attribute "diff" for class "Unequality"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:360:36 - error: Cannot access attribute "diff" for class "Relational"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:360:36 - error: Cannot access attribute "diff" for class "Unequality"
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:363:36 - error: Cannot access attribute "diff" for class "Relational"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:363:36 - error: Cannot access attribute "diff" for class "Unequality"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:370:36 - error: Cannot access attribute "diff" for class "Relational"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:370:36 - error: Cannot access attribute "diff" for class "Unequality"
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:372:36 - error: Cannot access attribute "diff" for class "Relational"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:372:36 - error: Cannot access attribute "diff" for class "Unequality"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:374:36 - error: Cannot access attribute "diff" for class "Relational"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:374:36 - error: Cannot access attribute "diff" for class "Unequality"
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:376:36 - error: Cannot access attribute "diff" for class "Relational"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:376:36 - error: Cannot access attribute "diff" for class "Unequality"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:389:36 - error: Cannot access attribute "diff" for class "Relational"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:389:36 - error: Cannot access attribute "diff" for class "Unequality"
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:390:36 - error: Cannot access attribute "diff" for class "Relational"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:390:36 - error: Cannot access attribute "diff" for class "Unequality"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:394:38 - error: Cannot access attribute "diff" for class "Relational"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:394:38 - error: Cannot access attribute "diff" for class "Unequality"
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:395:38 - error: Cannot access attribute "diff" for class "Relational"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:395:38 - error: Cannot access attribute "diff" for class "Unequality"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:396:38 - error: Cannot access attribute "diff" for class "Relational"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:396:38 - error: Cannot access attribute "diff" for class "Unequality"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:397:38 - error: Cannot access attribute "diff" for class "Relational"
-     Attribute "diff" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_indexed.py:397:38 - error: Cannot access attribute "diff" for class "Unequality"
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:554:13 - error: Cannot access attribute "canon_bp" for class "Expr"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:554:13 - error: Cannot access attribute "canon_bp" for class "One"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:554:13 - error: Cannot access attribute "canon_bp" for class "Zero"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:554:13 - error: Cannot access attribute "canon_bp" for class "TensExpr"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:558:15 - error: Cannot access attribute "canon_bp" for class "Expr"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:558:15 - error: Cannot access attribute "canon_bp" for class "Zero"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:558:15 - error: Cannot access attribute "canon_bp" for class "One"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:558:15 - error: Cannot access attribute "canon_bp" for class "NegativeOne"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:558:15 - error: Cannot access attribute "canon_bp" for class "Integer"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:558:15 - error: Cannot access attribute "canon_bp" for class "Rational"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:558:15 - error: Cannot access attribute "canon_bp" for class "NaN"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:558:15 - error: Cannot access attribute "canon_bp" for class "ComplexInfinity"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:558:15 - error: Cannot access attribute "canon_bp" for class "Half"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:558:15 - error: Cannot access attribute "canon_bp" for class "Infinity"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:558:15 - error: Cannot access attribute "canon_bp" for class "NegativeInfinity"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:558:15 - error: Cannot access attribute "canon_bp" for class "Float"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:558:15 - error: Cannot access attribute "canon_bp" for class "Number"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:577:13 - error: Cannot access attribute "canon_bp" for class "Expr"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:577:13 - error: Cannot access attribute "canon_bp" for class "One"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:577:13 - error: Cannot access attribute "canon_bp" for class "NegativeOne"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:577:13 - error: Cannot access attribute "canon_bp" for class "Zero"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/tensor/tests/test_tensor.py:577:13 - error: Cannot access attribute "canon_bp" for class "Integer"
-     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)

... (truncated 173 lines) ...

@erictraut erictraut merged commit 1b2a71a into main Mar 30, 2025
18 checks passed
@erictraut erictraut deleted the protoRegression branch March 30, 2025 18:22
erictraut added a commit that referenced this pull request Mar 31, 2025
* main:
  Fixed a bug that results in a false negative when a class that derives from `type[Any]` is assigned to any other type. This addresses #10185. (#10224)
  Removed support for `ru` and `ur` string prefixes. These were supported in Python 2.7 but are syntax errors in Python 3.x. This addresses #10222. (#10223)
  Fixed a bug that results in a false negative when the specialization of a TypeVarTuple includes multiple unpacked tuples of unknown length. This addresses #10219. (#10220)
  Extended `reportUnknownVariableType` check to include cases where a value whose type is a generic class parameterized by `Unknown` is assigned to a variable with a declared type. This addresses #10214. (#10217)
  Partly addressed inconsistency between override validation and protocol matching introduced in recent change. (#10215)
  Fix typo in docs (#10213)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant