Skip to content

Fix on_change redefinition warning in survey callback handling#70

Merged
cigamit merged 1 commit into
ctrliq:mainfrom
blaipr:fix-on-change-redefinition
Jun 27, 2026
Merged

Fix on_change redefinition warning in survey callback handling#70
cigamit merged 1 commit into
ctrliq:mainfrom
blaipr:fix-on-change-redefinition

Conversation

@blaipr

@blaipr blaipr commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix flake8 F811 (redefinition of unused name) in job_template.py and workflow_job_template.py
  • The on_change callback was first assigned None, then conditionally redefined as a nested function, triggering F811
  • Refactored to define the callback function unconditionally at the top, then assign it to a survey_callback variable only when needed

Test plan

  • flake8 --select=F811 plugins/modules/job_template.py plugins/modules/workflow_job_template.py returns no errors
  • Survey spec updates still work correctly on job templates and workflow job templates

@cigamit cigamit self-assigned this Jun 27, 2026
@cigamit cigamit merged commit 9ad2dda into ctrliq:main Jun 27, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants