| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Now that index, window, parsedVarName and pixel options are returned as str, int or float, drop the str()/int()/float() wrappers that only worked around Tcl_Obj results. The generated test_configure_* tests now also check that int- and float-valued options are returned as numbers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Test-only follow-up to gh-153513 (#153514).
Now that index, window and parsedVarName options are returned as str and unitless pixel options as int/float, this drops the str()/int()/float()/getint() wrappers that only worked around the previous Tcl_Obj results. Where the value crosses wantobjects modes (an int/float with objects enabled, a string with objects disabled), the bare wrapper is replaced with a mode-aware exact comparison rather than dropped, so the returned type is verified instead of masked.
The generated test_configure_* tests also gain a check that an int- or float-valued option is returned as a number (not a Tcl_Obj), and that an int-valued option is not returned as a float.
Wrappers are kept where the returned type is not uniform: resource types (color, bitmap, font, cursor), screen distances with a unit suffix, canvas item options and OptionMenu -width (which Tk returns as strings), and plain-string options.
Tested with Tk 8.6, 9.0 and 9.1, with objects enabled and disabled.
🤖 Generated with Claude Code