Skip to content

Commit ed36978

Browse files
authored
refactor: execute ruff (#531)
1 parent 825316f commit ed36978

44 files changed

Lines changed: 92 additions & 178 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/django_example/django_example/asgi.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
ASGI config for django_example project.
1+
"""ASGI config for django_example project.
32
43
It exposes the ASGI callable as a module-level variable named ``application``.
54

examples/django_example/django_example/settings.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
Django settings for django_example project.
1+
"""Django settings for django_example project.
32
43
Generated by 'django-admin startproject' using Django 5.0.2.
54

examples/django_example/django_example/urls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
"""
2-
URL configuration for django_example project.
1+
"""URL configuration for django_example project.
32
43
The `urlpatterns` list routes URLs to views. For more information please see:
54
https://docs.djangoproject.com/en/5.0/topics/http/urls/
5+
66
Examples:
77
Function views
88
1. Add an import: from my_app import views

examples/django_example/django_example/wsgi.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
WSGI config for django_example project.
1+
"""WSGI config for django_example project.
32
43
It exposes the WSGI callable as a module-level variable named ``application``.
54

examples/django_example/myapp/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55

66
def shutdown_handler(*args):
7-
"""
8-
This function handles the shutdown process.
7+
"""This function handles the shutdown process.
98
109
It calls the langfuse_flush function to flush any pending changes,
1110
and then exits the program with a status code of 0.

examples/django_example/myapp/langfuse_integration.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55

66

77
def get_response_openai(prompt):
8-
"""
9-
This simulates the response to a prompt using the OpenAI API.
8+
"""This simulates the response to a prompt using the OpenAI API.
109
1110
Args:
1211
prompt (str): The prompt for generating the response.

examples/fastapi_example/fastapi_example/main.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ async def main_route():
2929

3030

3131
async def get_response_openai(prompt, background_tasks: BackgroundTasks):
32-
"""
33-
This simulates the response to a prompt using the OpenAI API.
32+
"""This simulates the response to a prompt using the OpenAI API.
3433
3534
Args:
3635
prompt (str): The prompt for generating the response.

langfuse/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
'''
2-
.. include:: ../README.md
3-
'''
1+
""".. include:: ../README.md
2+
"""
43

54
from .client import Langfuse # noqa
65
from .version import __version__ # noqa

langfuse/api/core/datetime_utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55

66
def serialize_datetime(v: dt.datetime) -> str:
7-
"""
8-
Serialize a datetime including timezone info.
7+
"""Serialize a datetime including timezone info.
98
109
Uses the timezone info provided if present, otherwise uses the current runtime's timezone info.
1110

langfuse/api/core/jsonable_encoder.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# This file was auto-generated by Fern from our API Definition.
22

3-
"""
4-
jsonable_encoder converts a Python object to a JSON-friendly dict
3+
"""jsonable_encoder converts a Python object to a JSON-friendly dict
54
(e.g. datetimes to strings, Pydantic models to dicts).
65
76
Taken from FastAPI, and made a bit simpler

0 commit comments

Comments
 (0)