Skip to content

Commit 7196c20

Browse files
authored
Merge pull request #160 from fonttools/no-cmp-private-font-attrs
Don't compare private Font attributes
2 parents 8a097d4 + 973c634 commit 7196c20

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/ufoLib2/objects/font.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ class Font:
117117
default layer.
118118
"""
119119

120-
_path: Optional[PathLike] = attr.ib(default=None, metadata=dict(copyable=False))
120+
_path: Optional[PathLike] = attr.ib(
121+
default=None, metadata=dict(copyable=False), cmp=False
122+
)
121123

122124
layers: LayerSet = attr.ib(
123125
factory=LayerSet.default,
@@ -152,11 +154,15 @@ class Font:
152154
)
153155
"""ImageSet: A mapping of image file paths to arbitrary image data."""
154156

155-
_lazy: Optional[bool] = attr.ib(default=None, kw_only=True)
156-
_validate: bool = attr.ib(default=True, kw_only=True)
157+
_lazy: Optional[bool] = attr.ib(default=None, kw_only=True, cmp=False)
158+
_validate: bool = attr.ib(default=True, kw_only=True, cmp=False)
157159

158-
_reader: Optional[UFOReader] = attr.ib(default=None, kw_only=True, init=False)
159-
_fileStructure: Optional[UFOFileStructure] = attr.ib(default=None, init=False)
160+
_reader: Optional[UFOReader] = attr.ib(
161+
default=None, kw_only=True, init=False, cmp=False
162+
)
163+
_fileStructure: Optional[UFOFileStructure] = attr.ib(
164+
default=None, init=False, cmp=False
165+
)
160166

161167
def __attrs_post_init__(self) -> None:
162168
if self._path is not None:

0 commit comments

Comments
 (0)