Skip to content

Commit

Permalink
Fix typo (infiniflow#3319)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

Fix typo

### Type of change

- [x] Refactoring
  • Loading branch information
yuzhichang authored Nov 11, 2024
1 parent 20d6867 commit 7c486ee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/apps/document_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
from rag.utils.storage_factory import STORAGE_IMPL
from api.utils.file_utils import filename_type, thumbnail
from api.utils.web_utils import html2pdf, is_valid_url
from api.contants import IMG_BASE64_PREFIX
from api.constants import IMG_BASE64_PREFIX


@manager.route('/upload', methods=['POST'])
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions api/utils/file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from ruamel.yaml import YAML

from api.db import FileType
from api.contants import IMG_BASE64_PREFIX
from api.constants import IMG_BASE64_PREFIX

PROJECT_BASE = os.getenv("RAG_PROJECT_BASE") or os.getenv("RAG_DEPLOY_BASE")
RAG_BASE = os.getenv("RAG_BASE")
Expand Down Expand Up @@ -71,7 +71,7 @@ def get_home_cache_dir():
dir = os.path.join(os.path.expanduser('~'), ".ragflow")
try:
os.mkdir(dir)
except OSError as error:
except OSError:
pass
return dir

Expand Down Expand Up @@ -193,7 +193,7 @@ def thumbnail_img(filename, blob):
presentation.slides[0].get_thumbnail(0.03, 0.03).save(
buffered, drawing.imaging.ImageFormat.png)
return buffered.getvalue()
except Exception as e:
except Exception:
pass
return None

Expand Down

0 comments on commit 7c486ee

Please sign in to comment.