From b676a1764f0063549aa06c246b218fa25be9072d Mon Sep 17 00:00:00 2001 From: HLWeil Date: Tue, 20 Aug 2024 16:57:28 +0200 Subject: [PATCH] small fixes --- pyproject.toml | 8 ++++---- src/DynamicObj/DynamicObj.fs | 14 +------------- src/DynamicObj/ReflectionUtils.fs | 2 +- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 33693a1..0fad45c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,11 +2,11 @@ name = "DynamicObj" version = "3.0.0" description = "Fable compatible library supporting Dynamic Objects including inheritance in functional style." -authors = ["Heinrich Lukas Weil ", "Kevin Frey "] -maintainers = ["Florian Wetzels"] +authors = [""] +maintainers = [""] readme = "README.md" -repository = "https://github.com/nfdi4plants/ARCtrl" -keywords = ["arc", "annotated research context", "isa", "research data", "multi platform"] +repository = "" +keywords = [""] [tool.poetry.dependencies] python = "^3.10" diff --git a/src/DynamicObj/DynamicObj.fs b/src/DynamicObj/DynamicObj.fs index 55b2d28..80bf509 100644 --- a/src/DynamicObj/DynamicObj.fs +++ b/src/DynamicObj/DynamicObj.fs @@ -4,21 +4,9 @@ open System.Collections.Generic open Fable.Core -module Fable = - - [] - let getProperty (o:obj) (propName:string) : 'a = - jsNative - - [] - let getPropertyNames (o:obj) : string seq = - jsNative - [] type DynamicObj() = - - let mutable properties = new Dictionary() member this.Properties @@ -77,7 +65,7 @@ type DynamicObj() = #endif member this.Remove name = - match ReflectionUtils.removeStaticProperty this name with + match ReflectionUtils.removeProperty this name with | true -> true // Maybe in map | false -> properties.Remove(name) diff --git a/src/DynamicObj/ReflectionUtils.fs b/src/DynamicObj/ReflectionUtils.fs index 75d6452..02f4b0c 100644 --- a/src/DynamicObj/ReflectionUtils.fs +++ b/src/DynamicObj/ReflectionUtils.fs @@ -63,7 +63,7 @@ module ReflectionUtils = | :? System.Reflection.TargetInvocationException -> None | :? System.NullReferenceException -> None - let removeStaticProperty (o:obj) (propName:string) = + let removeProperty (o:obj) (propName:string) = match tryGetPropertyInfo o propName with | Some property when property.IsMutable ->