Skip to content

Commit

Permalink
chore: fix typo (#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
badayvedat authored Dec 18, 2024
1 parent c533747 commit c790545
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions projects/fal/src/fal/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from fal.api import RouteSignature
from fal.exceptions import FalServerlessException, RequestCancelledException
from fal.logging import get_logger
from fal.toolkit.file import request_lifecycle_repference
from fal.toolkit.file import request_lifecycle_preference
from fal.toolkit.file.providers.fal import LIFECYCLE_PREFERENCE

REALTIME_APP_REQUIREMENTS = ["websockets", "msgpack"]
Expand Down Expand Up @@ -342,7 +342,7 @@ async def provide_hints_headers(request, call_next):
@app.middleware("http")
async def set_global_object_preference(request, call_next):
try:
preference_dict = request_lifecycle_repference(request)
preference_dict = request_lifecycle_preference(request)
if preference_dict is not None:
# This will not work properly for apps with multiplexing enabled
# we may mix up the preferences between requests
Expand Down
6 changes: 3 additions & 3 deletions projects/fal/src/fal/toolkit/file/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def from_bytes(
fdata = FileData(data, content_type, file_name)

object_lifecycle_preference = (
request_lifecycle_repference(request) or LIFECYCLE_PREFERENCE.get()
request_lifecycle_preference(request) or LIFECYCLE_PREFERENCE.get()
)

try:
Expand Down Expand Up @@ -207,7 +207,7 @@ def from_path(

content_type = content_type or "application/octet-stream"
object_lifecycle_preference = (
request_lifecycle_repference(request) or LIFECYCLE_PREFERENCE.get()
request_lifecycle_preference(request) or LIFECYCLE_PREFERENCE.get()
)

try:
Expand Down Expand Up @@ -293,7 +293,7 @@ def __del__(self):
shutil.rmtree(self.extract_dir)


def request_lifecycle_repference(request: Optional[Request]) -> dict[str, str] | None:
def request_lifecycle_preference(request: Optional[Request]) -> dict[str, str] | None:
import json

if request is None:
Expand Down

0 comments on commit c790545

Please sign in to comment.