Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Commit 82d3504

Browse files
Drop field counter - no longer required
1 parent 84a657b commit 82d3504

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

typesystem/fields.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
class Field:
2121
errors: typing.Dict[str, str] = {}
22-
_creation_counter = 0
2322

2423
def __init__(
2524
self,
@@ -28,7 +27,7 @@ def __init__(
2827
description: str = "",
2928
default: typing.Any = NO_DEFAULT,
3029
allow_null: bool = False,
31-
read_only: bool = False
30+
read_only: bool = False,
3231
):
3332
assert isinstance(title, str)
3433
assert isinstance(description, str)
@@ -44,11 +43,6 @@ def __init__(
4443
self.allow_null = allow_null
4544
self.read_only = read_only
4645

47-
# We need this global counter to determine what order fields have
48-
# been declared in when used with `Schema`.
49-
self._creation_counter = Field._creation_counter
50-
Field._creation_counter += 1
51-
5246
def validate(self, value: typing.Any) -> typing.Any:
5347
raise NotImplementedError() # pragma: no cover
5448

0 commit comments

Comments
 (0)