Skip to content

Commit

Permalink
Update binprovider.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pirate authored Nov 12, 2024
1 parent 41a6fba commit 75a9cc3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pydantic_pkgr/binprovider.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,15 @@ class BinProvider(BaseModel):
_install_timeout: int = 120
_version_timeout: int = 10
_cache: Dict[str, Dict[str, Any]] | None = None
_INSTALLER_BIN_ABSPATH: HostBinPath | None = None # speed optimization only, faster to cache the abspath than to recompute it on every access
_INSTALLER_BIN_ABSPATH: HostBinPath | None = None # speed optimization only, faster to cache the abspath than to recompute it on every access
_INSTALLER_BINARY: ShallowBinary | None = None # speed optimization only, faster to cache the binary than to recompute it on every access

def __eq__(self, other: Any) -> bool:
try:
return dict(self) == dict(other) # only compare pydantic fields, ignores classvars/@properties/@cached_properties/_fields/etc.
except Exception:
return False

@property
def EUID(self) -> int:
"""
Expand Down

0 comments on commit 75a9cc3

Please sign in to comment.