Skip to content

fix(motor test): There was a error popup about functools.partial - #1251

Merged
amilcarlucas merged 1 commit into
masterfrom
fix_1244
Feb 4, 2026
Merged

fix(motor test): There was a error popup about functools.partial#1251
amilcarlucas merged 1 commit into
masterfrom
fix_1244

Conversation

@amilcarlucas

Copy link
Copy Markdown
Collaborator

In frontend_tkinter_motor_test.py, the _schedule_ready_reset method was using functools.partial to schedule a delayed callback with tkinter.after(). However, Tkinter's after() method tries to access the name attribute of the callable for internal tracking, and functools.partial objects don't have this attribute, causing the error.

In frontend_tkinter_motor_test.py, the _schedule_ready_reset method was
using functools.partial to schedule a delayed callback with tkinter.after().
However, Tkinter's after() method tries to access the __name__ attribute of
the callable for internal tracking, and functools.partial objects don't
have this attribute, causing the error.
Copilot AI review requested due to automatic review settings February 4, 2026 21:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an error in the motor test functionality where using functools.partial with tkinter's after() method caused an AttributeError because functools.partial objects don't have a __name__ attribute that Tkinter expects.

Changes:

  • Removed unused functools.partial import
  • Replaced functools.partial with a lambda expression in _schedule_ready_reset method

@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
11278 10273 91% 89% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
ardupilot_methodic_configurator/frontend_tkinter_motor_test.py 89% 🟢
TOTAL 89% 🟢

updated for commit: 855fde0 by action🐍

@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Test Results

    3 files  ±0      3 suites  ±0   42m 3s ⏱️ + 1m 9s
2 936 tests ±0  2 927 ✅ ±0   9 💤 ±0  0 ❌ ±0 
8 808 runs  ±0  8 781 ✅ ±0  27 💤 ±0  0 ❌ ±0 

Results for commit 855fde0. ± Comparison against base commit cc7c3c5.

@amilcarlucas
amilcarlucas merged commit 63c2db8 into master Feb 4, 2026
37 checks passed
@amilcarlucas
amilcarlucas deleted the fix_1244 branch February 4, 2026 21:57
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