Skip to content

Commit d5b9bb5

Browse files
Moittie VincentZorin95670
Moittie Vincent
authored andcommitted
✏️(backend) Fix some typo
Signed-off-by: Zorin95670 <[email protected]>
1 parent 6be87ed commit d5b9bb5

10 files changed

+19
-15
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ and this project adheres to
88

99
## [Unreleased]
1010

11+
## Changed
12+
13+
- ✏️(backend) Fix some typo
14+
1115
## [3.2.1] - 2025-05-06
1216

1317
## Fixed

src/backend/core/api/viewsets.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ class DocumentViewSet(
403403
404404
Example:
405405
- Ascending: GET /api/v1.0/documents/?ordering=created_at
406-
- Desceding: GET /api/v1.0/documents/?ordering=-title
406+
- Descending: GET /api/v1.0/documents/?ordering=-title
407407
408408
### Filtering:
409409
- `is_creator_me=true`: Returns documents created by the current user.
@@ -576,7 +576,7 @@ def list(self, request, *args, **kwargs):
576576
queryset, filter_data["is_favorite"]
577577
)
578578

579-
# Apply ordering only now that everyting is filtered and annotated
579+
# Apply ordering only now that everything is filtered and annotated
580580
queryset = filters.OrderingFilter().filter_queryset(
581581
self.request, queryset, self
582582
)
@@ -889,7 +889,7 @@ def tree(self, request, pk, *args, **kwargs):
889889
)
890890

891891
# Compute cache for ancestors links to avoid many queries while computing
892-
# abilties for his documents in the tree!
892+
# abilities for his documents in the tree!
893893
ancestors_links.append(
894894
{"link_reach": ancestor.link_reach, "link_role": ancestor.link_role}
895895
)

src/backend/core/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ def get_links_definitions(self, ancestors_links):
747747
for ancestor in ancestors_links:
748748
links_definitions[ancestor["link_reach"]].add(ancestor["link_role"])
749749

750-
return dict(links_definitions) # Convert defaultdict back to a normal dict
750+
return dict(links_definitions) # Convert default dict back to a normal dict
751751

752752
def compute_ancestors_links(self, user):
753753
"""

src/backend/core/services/ai_services.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
}
4545

4646
AI_TRANSLATE = (
47-
"Keep the same html stucture and formatting. "
47+
"Keep the same html structure and formatting. "
4848
"Translate the content in the html to the specified language {language:s}. "
4949
"Check the translation for accuracy and make any necessary corrections. "
5050
"Do not provide any other information."

src/backend/core/services/collaboration_services.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self):
1717
def reset_connections(self, room, user_id=None):
1818
"""
1919
Reset connections of a room in the collaboration server.
20-
Reseting a connection means that the user will be disconnected and will
20+
Resetting a connection means that the user will be disconnected and will
2121
have to reconnect to the collaboration server, with updated rights.
2222
"""
2323
endpoint = "reset-connections"

src/backend/core/tests/documents/test_api_documents_ai_transform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def test_api_documents_ai_transform_authenticated_forbidden(reach, role):
150150
@patch("openai.resources.chat.completions.Completions.create")
151151
def test_api_documents_ai_transform_authenticated_success(mock_create, reach, role):
152152
"""
153-
Autenticated who are not related to a document should be able to request AI transform
153+
Authenticated who are not related to a document should be able to request AI transform
154154
if the link reach and role permit it.
155155
"""
156156
user = factories.UserFactory()

src/backend/core/tests/documents/test_api_documents_ai_translate.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def test_api_documents_ai_translate_anonymous_success(mock_create):
9999
{
100100
"role": "system",
101101
"content": (
102-
"Keep the same html stucture and formatting. "
102+
"Keep the same html structure and formatting. "
103103
"Translate the content in the html to the specified language Spanish. "
104104
"Check the translation for accuracy and make any necessary corrections. "
105105
"Do not provide any other information."
@@ -172,7 +172,7 @@ def test_api_documents_ai_translate_authenticated_forbidden(reach, role):
172172
@patch("openai.resources.chat.completions.Completions.create")
173173
def test_api_documents_ai_translate_authenticated_success(mock_create, reach, role):
174174
"""
175-
Autenticated who are not related to a document should be able to request AI translate
175+
Authenticated who are not related to a document should be able to request AI translate
176176
if the link reach and role permit it.
177177
"""
178178
user = factories.UserFactory()
@@ -197,7 +197,7 @@ def test_api_documents_ai_translate_authenticated_success(mock_create, reach, ro
197197
{
198198
"role": "system",
199199
"content": (
200-
"Keep the same html stucture and formatting. "
200+
"Keep the same html structure and formatting. "
201201
"Translate the content in the html to the "
202202
"specified language Colombian Spanish. "
203203
"Check the translation for accuracy and make any necessary corrections. "
@@ -274,7 +274,7 @@ def test_api_documents_ai_translate_success(mock_create, via, role, mock_user_te
274274
{
275275
"role": "system",
276276
"content": (
277-
"Keep the same html stucture and formatting. "
277+
"Keep the same html structure and formatting. "
278278
"Translate the content in the html to the "
279279
"specified language Colombian Spanish. "
280280
"Check the translation for accuracy and make any necessary corrections. "

src/backend/core/tests/documents/test_api_documents_attachment_upload.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def test_api_documents_attachment_upload_authenticated_forbidden(reach, role):
127127
)
128128
def test_api_documents_attachment_upload_authenticated_success(reach, role):
129129
"""
130-
Autenticated users who are not related to a document should be able to upload
130+
Authenticated users who are not related to a document should be able to upload
131131
a file when the link reach and role permit it.
132132
"""
133133
user = factories.UserFactory()
@@ -255,7 +255,7 @@ def test_api_documents_attachment_upload_invalid(client):
255255

256256

257257
def test_api_documents_attachment_upload_size_limit_exceeded(settings):
258-
"""The uploaded file should not exceeed the maximum size in settings."""
258+
"""The uploaded file should not exceed the maximum size in settings."""
259259
settings.DOCUMENT_IMAGE_MAX_SIZE = 1048576 # 1 MB for test
260260

261261
user = factories.UserFactory()

src/backend/core/tests/documents/test_api_documents_create_for_owner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def test_api_documents_create_for_owner_existing_user_email_no_sub_with_fallback
279279
"""
280280
It should be possible to create a document on behalf of a pre-existing user for
281281
who the sub was not found if the settings allow it. This edge case should not
282-
happen in a healthy OIDC federation but can be usefull if an OIDC provider modifies
282+
happen in a healthy OIDC federation but can be usefully if an OIDC provider modifies
283283
users sub on each login for example...
284284
"""
285285
user = factories.UserFactory(language="en-us")

src/backend/core/tests/documents/test_api_documents_move.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def test_api_documents_move_authenticated_deleted_target_as_child(position):
310310
def test_api_documents_move_authenticated_deleted_target_as_sibling(position):
311311
"""
312312
It should not be possible to move a document as a sibling of a deleted target document
313-
if the user has no rigths on its parent.
313+
if the user has no rights on its parent.
314314
"""
315315
user = factories.UserFactory()
316316
client = APIClient()

0 commit comments

Comments
 (0)