RDFLib / rdflib

RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.
https://rdflib.readthedocs.org
BSD 3-Clause "New" or "Revised" License
2.15k stars 555 forks source link

Reconcile debpendabot #2840

Closed ashleysommer closed 2 months ago

ashleysommer commented 2 months ago

Summary of changes

Checklist

ashleysommer commented 2 months ago

This branch uses a new content-hash overriding the content-hash conflict that most of these PRs had.

ashleysommer commented 2 months ago

Errors:

rdflib/query.py:160: error: Unused "type: ignore[type-var]" comment  [unused-ignore]
  rdflib/graph.py:1785: error: Unused "type: ignore" comment  [unused-ignore]
  rdflib/graph.py:1829: error: Unused "type: ignore" comment  [unused-ignore]
  rdflib/graph.py:2000: error: Unused "type: ignore" comment  [unused-ignore]
  rdflib/graph.py:2003: error: Unused "type: ignore" comment  [unused-ignore]
  rdflib/graph.py:2798: error: Unused "type: ignore" comment  [unused-ignore]
  rdflib/graph.py:2817: error: Unused "type: ignore" comment  [unused-ignore]
  rdflib/graph.py:2820: error: Unused "type: ignore" comment  [unused-ignore]
  rdflib/graph.py:2987: error: Unused "type: ignore" comment  [unused-ignore]
  rdflib/graph.py:2990: error: Unused "type: ignore" comment  [unused-ignore]
  rdflib/plugins/sparql/results/xmlresults.py:257: error: Unused "type: ignore" comment  [unused-ignore]
  rdflib/plugins/sparql/results/xmlresults.py:287: error: Unused "type: ignore" comment  [unused-ignore]
  rdflib/plugins/parsers/trix.py: note: In member "startElementNS" of class "TriXHandler":
  rdflib/plugins/parsers/trix.py:108: error: Incompatible types in assignment (expression has type "str", variable has type "None")  [assignment]
  rdflib/plugins/parsers/trix.py:108: error: Argument 1 to "getValue" of "AttributesImpl" has incompatible type "Tuple[str, str]"; expected "str"  [arg-type]
  rdflib/plugins/parsers/trix.py:113: error: Incompatible types in assignment (expression has type "str", variable has type "None")  [assignment]
  rdflib/plugins/parsers/trix.py:125: error: Incompatible types in assignment (expression has type "str", variable has type "None")  [assignment]
  rdflib/plugins/parsers/trix.py:125: error: Argument 1 to "getValue" of "AttributesImpl" has incompatible type "Tuple[str, str]"; expected "str"  [arg-type]
  rdflib/plugins/parsers/trix.py: note: In member "parse" of class "TriXParser":
  rdflib/plugins/parsers/trix.py:287: error: "ContentHandler" has no attribute "preserve_bnode_ids"  [attr-defined]
  rdflib/plugins/parsers/rdfxml.py: note: In member "startElementNS" of class "RDFXMLHandler":
  rdflib/plugins/parsers/rdfxml.py:184: error: No overload variant of "get" of "AttributesImpl" matches argument types "Tuple[str, str]", "None"  [call-overload]
  rdflib/plugins/parsers/rdfxml.py:184: note: Possible overload variants:
  rdflib/plugins/parsers/rdfxml.py:184: note:     def get(self, name: str, alternative: None = ...) -> Optional[str]
  rdflib/plugins/parsers/rdfxml.py:184: note:     def get(self, name: str, alternative: str) -> str
  rdflib/plugins/parsers/rdfxml.py:201: error: No overload variant of "get" of "AttributesImpl" matches argument types "Tuple[str, str]", "None"  [call-overload]
  rdflib/plugins/parsers/rdfxml.py:201: note: Possible overload variants:
  rdflib/plugins/parsers/rdfxml.py:201: note:     def get(self, name: str, alternative: None = ...) -> Optional[str]
  rdflib/plugins/parsers/rdfxml.py:201: note:     def get(self, name: str, alternative: str) -> str
  rdflib/plugins/parsers/rdfxml.py: note: In member "convert" of class "RDFXMLHandler":
  rdflib/plugins/parsers/rdfxml.py:280: error: Statement is unreachable  [unreachable]
  rdflib/plugins/parsers/rdfxml.py: note: In member "literal_element_start" of class "RDFXMLHandler":
  rdflib/plugins/parsers/rdfxml.py:593: error: Incompatible types in assignment (expression has type "str", variable has type "Tuple[str, str]")  [assignment]
  rdflib/plugins/parsers/rdfxml.py: note: In member "parse" of class "RDFXMLParser":
  rdflib/plugins/parsers/rdfxml.py:646: error: "ContentHandler" has no attribute "preserve_bnode_ids"  [attr-defined]

Looks like these are new, caused by the latest update to MyPy.

The unused-ignore are funny. Its now an error to put type: ignore on a line where the type does not need to be ignored :rofl:

coveralls commented 2 months ago

Coverage Status

coverage: 91.04% (+0.001%) from 91.039% when pulling b7656349a8f9d1932c1ba322316f3e7eebfc88a5 on reconcile_debpendabot into c9dc71e27181592f6bbd794b0f41219100f8da5e on main.