Modernize reviewboard.hostingsvcs.base

Review Request #14587 — Created Sept. 4, 2025 and updated

Information

Review Board
master

Reviewers

This change modernizes the base classes for hosting services, primarily
adding type annotations and correcting docstrings.

The authorize and check_repository methods have been made
keyword-only. These were already called by unpacking a dict, and in
practice many of the individual implementations had inconsistent
argument lists which would have made calling with positional arguments
fail. The only places where we were using positional args were in a few
unit tests, which have been updated. I've added
@deprecate_non_keyword_only_args, but given the existing
inconsistencies, we could probably do this change without a deprecation
phase at all.

Ran unit tests.

Summary ID
Modernize reviewboard.hostingsvcs.base
This change modernizes the base classes for hosting services, primarily adding type annotations and correcting docstrings. The `authorize` and `check_repository` methods have been made keyword-only. These were already called by unpacking a dict, and in practice many of the individual implementations had inconsistent argument lists which would have made calling with positional arguments fail. The only places where we were using positional args were in a few unit tests, which have been updated. I've added `@deprecate_non_keyword_only_args`, but given the existing inconsistencies, we could probably do this change without a deprecation phase at all. Testing Done: Ran unit tests.
pzyxxllrytpplzmnpllmrsqvktywmqls
david
Review request changed
Change Summary:

Pull in a few changes that snuck into a different commit.

Commits:
Summary ID
Modernize reviewboard.hostingsvcs.base
This change modernizes the base classes for hosting services, primarily adding type annotations and correcting docstrings. The `authorize` and `check_repository` methods have been made keyword-only. These were already called by unpacking a dict, and in practice many of the individual implementations had inconsistent argument lists which would have made calling with positional arguments fail. The only places where we were using positional args were in a few unit tests, which have been updated. I've added `@deprecate_non_keyword_only_args`, but given the existing inconsistencies, we could probably do this change without a deprecation phase at all. Testing Done: Ran unit tests.
pzyxxllrytpplzmnpllmrsqvktywmqls
Modernize reviewboard.hostingsvcs.base
This change modernizes the base classes for hosting services, primarily adding type annotations and correcting docstrings. The `authorize` and `check_repository` methods have been made keyword-only. These were already called by unpacking a dict, and in practice many of the individual implementations had inconsistent argument lists which would have made calling with positional arguments fail. The only places where we were using positional args were in a few unit tests, which have been updated. I've added `@deprecate_non_keyword_only_args`, but given the existing inconsistencies, we could probably do this change without a deprecation phase at all. Testing Done: Ran unit tests.
pzyxxllrytpplzmnpllmrsqvktywmqls

Checks run (2 succeeded)

flake8 passed.
JSHint passed.