Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

119 fix aliases declaration in pipeline methods #120

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

OlivierLegrand
Copy link
Collaborator

No description provided.

@OlivierLegrand OlivierLegrand linked an issue Apr 23, 2024 that may be closed by this pull request
@@ -74,7 +74,7 @@ class Group(Stage):

Attributes:
-----------
- by, str | list[str] | set[str] | dict | None : field or group of fields to group by
- by (_id), str | list[str] | set[str] | dict | None : field or group of fields to group by
- query, dict | None : Computed aggregated values (per group)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change

@@ -77,7 +77,7 @@ class ReplaceRoot(Stage):
-----------

- statement, dict : the statement generated during instantiation after parsing the other arguments
- path_to_new_root, str|None : the path to the embedded document to be promoted
- path_to_new_root (path), str|None : the path to the embedded document to be promoted
- document, dict|None : document being created and to be set as the new root or expression

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change

@@ -453,7 +451,7 @@ def group(self, *, by:Any|None=None, _id:Any|None=None, query:dict={})->Self:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change

Comment on lines 567 to +571
right = right,
on = on,
left_on = left_on,
right_on = right_on,
name =name
left_on = left_on or local_field,
right_on = right_on or foreign_field,
name = name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
right = right,
on = on,
left_on = left_on,
right_on = right_on,
name =name
left_on = left_on or local_field,
right_on = right_on or foreign_field,
name = name
right=right,
on=on,
left_on=left_on or local_field,
right_on=right_on or foreign_field,
name=name,

@@ -1376,7 +1383,9 @@ def union_with(self, collection:str, coll:str, pipeline:list[dict]|None=None)->S
"""

self.stages.append(
UnionWith(collection=collection, pipeline=pipeline)
UnionWith(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Unexpected keyword argument "collection" for "UnionWith" [call-arg]

@VianneyMI VianneyMI self-assigned this Apr 23, 2024
@VianneyMI VianneyMI self-requested a review April 23, 2024 18:28
Copy link
Owner

@VianneyMI VianneyMI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ça aurait été bien d'ajouter des tests ou de modifier les tests existants pour prévenir les régressions sur ce cas d'usage.

@VianneyMI VianneyMI merged commit 733c372 into main Apr 23, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix aliases declaration in pipeline methods
2 participants