ntprop 0.2.1__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ntprop
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A way to create transparent NetworkTables variables
5
5
  License: MIT
6
6
  Author: Kellen Watt
@@ -95,7 +95,7 @@ class NumberProperty(NTProperty, ty="Double"):
95
95
  return self.cached
96
96
 
97
97
  def set(self, value: float | int):
98
- if value is not float and value is not int:
98
+ if type(value) is not float and type(value) is not int:
99
99
  raise ValueError("Can not assign non-numeric to NumberProperty")
100
100
  self.cached = value
101
101
  self.pub.set(value)
@@ -110,7 +110,7 @@ class BooleanProperty(NTProperty, ty="Boolean"):
110
110
  return self.cached
111
111
 
112
112
  def set(self, value: bool):
113
- if self.strict and value is not bool:
113
+ if self.strict and type(value) is not bool:
114
114
  raise ValueError("Can not assign non-boolean to BooleanProperty in strict mode")
115
115
 
116
116
  value = bool(value)
@@ -127,7 +127,7 @@ class StringProperty(NTProperty, ty="String"):
127
127
  return self.cached
128
128
 
129
129
  def set(self, value: str):
130
- if self.strict and value is not str:
130
+ if self.strict and type(value) is not str:
131
131
  raise ValueError("Can not assign non-string to StringProperty in strict mode")
132
132
 
133
133
  value = str(value)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ntprop"
3
- version = "0.2.1"
3
+ version = "0.2.2"
4
4
  description = "A way to create transparent NetworkTables variables"
5
5
  authors = [
6
6
  {name = "Kellen Watt",email = "kellen@wattsoft.dev"}
File without changes
File without changes