Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
abidlabs committed Jan 24, 2025
1 parent 5d0d499 commit 85f72df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion gradio/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,9 @@ def skip_api(self):
def get_component_class_id(cls) -> str:
module_name = cls.__module__
module_path = sys.modules[module_name].__file__
module_hash = hashlib.sha256(f"{cls.__name__}_{module_path}".encode()).hexdigest()
module_hash = hashlib.sha256(
f"{cls.__name__}_{module_path}".encode()
).hexdigest()
return module_hash

@property
Expand Down
4 changes: 3 additions & 1 deletion gradio/components/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ def has_event(cls, event: str | EventListener) -> bool:
def get_component_class_id(cls) -> str:
module_name = cls.__module__
module_path = sys.modules[module_name].__file__
module_hash = hashlib.sha256(f"{cls.__name__}_{module_path}".encode()).hexdigest()
module_hash = hashlib.sha256(
f"{cls.__name__}_{module_path}".encode()
).hexdigest()
return module_hash


Expand Down

0 comments on commit 85f72df

Please sign in to comment.