Skip to content

[python-jenkins] Some methods can return None - #16845

Merged
srittau merged 1 commit into
python:mainfrom
Primeteumm:python-jenkins-none-returns
Nov 16, 2026
Merged

srittau merged 1 commit into
python:mainfrom
Primeteumm:python-jenkins-none-returns

Conversation

@Primeteumm

Copy link
Copy Markdown
Contributor

get_build_artifact and get_build_stages return None when Jenkins answers 404, get_plugin_info returns None for an unknown plugin, and job_exists/view_exists return True or fall through to None: get_build_artifact, get_build_stages, get_plugin_info, job_exists, view_exists.

Agent used: Claude Code (Claude Opus 5.5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

def get_view_name(self, name: str) -> str | None: ...
def assert_view_exists(self, name: str, exception_message: str = "view[%s] does not exist") -> None: ...
def view_exists(self, name: str) -> bool: ...
def view_exists(self, name: str) -> Literal[True] | None: ...

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What an ... interesting ... API.

@srittau
srittau merged commit 8b41db5 into python:main Nov 16, 2026
74 checks passed
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