Skip to content

Fix CI - #131

Merged
abelcheung merged 5 commits into
abelcheung:mainfrom
andersk:fix-ci-checkers
Sep 25, 2026
Merged

Fix CI#131
abelcheung merged 5 commits into
abelcheung:mainfrom
andersk:fix-ci-checkers

Conversation

@andersk

@andersk andersk commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

I know you told me the failing CI isn’t my problem. Still, working in a repo with passing CI is more pleasant for everyone, so here’s my try at fixing it.

andersk and others added 5 commits September 25, 2026 10:25
Newer mypy, pyright, basedpyright, pyrefly and ty all reject
@disjoint_base on a Protocol class.  _XPathEvaluatorBase is a concrete
Cython base class at runtime, so @disjoint_base is accurate; the
Protocol base was only used to make the abstract __call__ method
enforceable.  ABCMeta keeps that behavior (instantiating it, or a
subclass that doesn't implement __call__, is still an error), the same
way XSLTExtension does it.

stubtest now compares __init__ against the runtime signature, which the
stub doesn't declare, so allowlist it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ement

pyright 1.1.414 and pyrefly 1.3.1 now report that _Element and int/float
are incompatible disjoint bases, as mypy and ty already did.  These
classes only pretend to subclass int/float, so add the corresponding
ignore comments.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- invalid-method-override on classes that combine HtmlElement with
  another base: HtmlElement overrides the Self-typed _Element methods
  with HtmlElement-typed ones.  HtmlProcessingInstruction, HtmlComment
  and HtmlEntity already suppress the same conflict for mypy and
  pyright.
- invalid-generic-class on _ElementTree.findall() and
  ElementMaker._typemap, which use the covariant _ET_co in invariant
  positions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- mypy 1.20 no longer needs type: ignore[var-annotated] when assigning
  the result of the deliberately invalid make_links_absolute() and
  rewrite_links() calls, and reports the ignores as unused.  Call them
  without assigning the result, which works with old and new mypy.
- pyright 1.1.414 narrows an Any-typed variable to Any | None after an
  "is None" check, even inside a conditional expression.  Ignore the
  resulting error where test_receive_arg_bad_1 deliberately passes an
  arbitrary value.
- pyrefly 1.3.1 reports the functools.partial() call in
  _get_compressed_fp_from() under a new error code.  Instead of
  ignoring it, replace the dynamic keyword argument lookup with typed
  opener functions, which also lets the helper drop its overloads and
  Any return type.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
mypy 2.x no longer supports python_version = 3.9, and the JSON output
of mypy >= 1.20 includes end_line and end_column keys that
ci-annotation-converter rejects.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@abelcheung

Copy link
Copy Markdown
Owner

Let me fast track this PR first. Even if there are other remaining issues to be handled, they can be dealt with in new PRs later.

@abelcheung
abelcheung merged commit 55ce077 into abelcheung:main Sep 25, 2026
8 checks passed
@andersk
andersk deleted the fix-ci-checkers branch September 25, 2026 23:45
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.

2 participants