diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4e500b424..2b0a2436d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,6 +19,8 @@ jobs: require: write username: ${{ github.triggering_actor }} error-if-missing: true + # Skip permission check for the bot user + skip-check-users: codegen-sh[bot] unit-tests: needs: access-check diff --git a/src/codegen/cli/sdk/function.py b/src/codegen/cli/sdk/function.py index 345cf977d..6af46325f 100644 --- a/src/codegen/cli/sdk/function.py +++ b/src/codegen/cli/sdk/function.py @@ -34,7 +34,7 @@ def lookup(cls, name: str) -> "Function": return cls(name=name, codemod_id=response.codemod_id, version_id=response.version_id, _api_client=api_client) - def run(self, pr: bool = False, **kwargs) -> RunCodemodOutput: + def run(self, pr: bool = False, **kwargs: dict) -> RunCodemodOutput: """Run the function with the given arguments. Args: diff --git a/src/codegen/cli/utils/count_functions.py b/src/codegen/cli/utils/count_functions.py index f02f82a53..8ccf8b475 100644 --- a/src/codegen/cli/utils/count_functions.py +++ b/src/codegen/cli/utils/count_functions.py @@ -3,6 +3,7 @@ import codegen.cli.sdk.decorator from codegen.cli.utils.count_functions_2 import NumberType +from codegen.sdk.core.codebase import Codebase # from app.codemod.compilation.models.context import CodemodContext # from app.codemod.compilation.models.pr_options import PROptions @@ -21,7 +22,7 @@ class CountFunctionsArgs(BaseModel): @codegen.cli.sdk.decorator.function("count-functions") -def run(codebase, pr_options, arguments: CountFunctionsArgs): +def run(codebase: Codebase, pr_options: dict, arguments: CountFunctionsArgs) -> None: # Count Functions in Codebase # Initialize a total function counter diff --git a/src/codegen/cli/workspace/docs_workspace.py b/src/codegen/cli/workspace/docs_workspace.py index f12437857..9af379a4d 100644 --- a/src/codegen/cli/workspace/docs_workspace.py +++ b/src/codegen/cli/workspace/docs_workspace.py @@ -4,7 +4,7 @@ from rich.status import Status -def populate_api_docs(dest: Path, api_docs: dict[str, str], status: Status): +def populate_api_docs(dest: Path, api_docs: dict[str, str], status: Status) -> None: """Writes all API docs to the docs folder""" status.update("Populating API documentation...") # Remove existing docs diff --git a/src/codegen/extensions/events/interface.py b/src/codegen/extensions/events/interface.py index 998afa9d2..ee35b6115 100644 --- a/src/codegen/extensions/events/interface.py +++ b/src/codegen/extensions/events/interface.py @@ -4,11 +4,11 @@ class EventHandlerManagerProtocol(Protocol): - def subscribe_handler_to_webhook(self, func_name: str, modal_app: modal.App, event_name): + def subscribe_handler_to_webhook(self, func_name: str, modal_app: modal.App, event_name: str) -> None: pass - def unsubscribe_handler_to_webhook(self, func_name: str, modal_app: modal.App, event_name): + def unsubscribe_handler_to_webhook(self, func_name: str, modal_app: modal.App, event_name: str) -> None: pass - def unsubscribe_all_handlers(self): + def unsubscribe_all_handlers(self) -> None: pass