From 32b21f55049099da2c5cba368c146a39e2b0e356 Mon Sep 17 00:00:00 2001 From: Pradyoth P Date: Mon, 25 May 2026 17:40:39 +0530 Subject: [PATCH 1/2] Fix empty file generation for create-settings-file Fixes #327 When generating the default TOML settings file, the DEFAULT_SETTINGS dictionary mistakenly used Property objects as keys instead of strings. This caused tomlkit.dumps() to throw a TypeError under the hood, which was silently swallowed, resulting in an empty configuration file being written. Using the .value string representation fixes the serialization. --- modelscan/settings.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modelscan/settings.py b/modelscan/settings.py index 56b3a796..de25d78b 100644 --- a/modelscan/settings.py +++ b/modelscan/settings.py @@ -75,12 +75,12 @@ class SupportedModelFormats: "middlewares": { "modelscan.middlewares.FormatViaExtensionMiddleware": { "formats": { - SupportedModelFormats.TENSORFLOW: [".pb"], - SupportedModelFormats.KERAS_H5: [".h5"], - SupportedModelFormats.KERAS: [".keras"], - SupportedModelFormats.NUMPY: [".npy"], - SupportedModelFormats.PYTORCH: [".bin", ".pt", ".pth", ".ckpt"], - SupportedModelFormats.PICKLE: [ + SupportedModelFormats.TENSORFLOW.value: [".pb"], + SupportedModelFormats.KERAS_H5.value: [".h5"], + SupportedModelFormats.KERAS.value: [".keras"], + SupportedModelFormats.NUMPY.value: [".npy"], + SupportedModelFormats.PYTORCH.value: [".bin", ".pt", ".pth", ".ckpt"], + SupportedModelFormats.PICKLE.value: [ ".pkl", ".pickle", ".joblib", From 9c7fff0635332a042fc6399d4d1621ba0fc09894 Mon Sep 17 00:00:00 2001 From: Pradyoth P Date: Mon, 25 May 2026 17:50:54 +0530 Subject: [PATCH 2/2] doc: update copyright year to 2026 in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 67983e83..0ac0cd47 100644 --- a/README.md +++ b/README.md @@ -242,7 +242,7 @@ to learn more! ## Licensing -Copyright 2024 Protect AI +Copyright 2026 Protect AI Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.