Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DictionaryProperty valid_types bugs, and other misc property issues #602

Commits on Sep 15, 2024

  1. Fix DictionaryProperty so that EnumProperty and ReferenceProperty both

    work as valid_types, and fix some bugs.
     - DictionaryProperty.__init__()'s valid_types argument now accepts either
       property classes or instances
     - DictionaryProperty now correctly propagates allow_custom down to its
       valid_types properties, and propagates their returned has_custom flag
       upward
     - DictionaryProperty's cleaned dictionaries actually contain the cleaned
       values now (before, the cleaned values were ignored)
    
    Property class cleanup:
     - Property subclass .clean() methods now are correct overrides of the
       base class method, including parameter naming and default values
     - OpenVocabProperty now doesn't treat any value as custom, regardless of
       the allow_custom setting, which was our original intent.  A violation
       of strict mode now causes ValueError to be raised, not
       CustomContentError.
     - BooleanProperty.clean() now honors strict=True (it will only accept
       values True and False in that case).
    
    Added various property tests of strictness, and additional
    DictionaryProperty tests which exercise custom value detection when used
    with ReferenceProperty.
    chisholm committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    f0f6d8f View commit details
    Browse the repository at this point in the history