Skip to content

Fix conditional method typing - #220

Open
rushi806 wants to merge 1 commit into
gogcom:masterfrom
rushi806:fix/issue-167
Open

Fix conditional method typing#220
rushi806 wants to merge 1 commit into
gogcom:masterfrom
rushi806:fix/issue-167

Conversation

@rushi806

Copy link
Copy Markdown

This pull request fixes a mypy type-checking error in src/galaxy/api/plugin.py.

The _register_method() function previously defined method() differently depending on the immediate condition:

A synchronous method() when immediate=True
An asynchronous method() when immediate=False

This caused mypy to report:

All conditional function variants must have identical signatures

The implementation was refactored so that method() has a single definition while preserving the existing synchronous and asynchronous behavior.

Testing
mypy src — passed
pytest — passed

No unrelated files or functionality were changed.

Note

This change addresses the mypy/type-checking issue. It should not be described as fixing GitHub Issue #167 unless the maintainer confirms that this change is directly related to that issue.

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.

1 participant