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

ref: Add ruff rules for pylint (PL) #4032

Merged
merged 2 commits into from
Oct 8, 2024
Merged

Conversation

cbornet
Copy link
Collaborator

@cbornet cbornet commented Oct 6, 2024

Add ruff rules for pylint (PL)

@cbornet cbornet requested a review from ogabrielluiz October 6, 2024 11:16
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. python Pull requests that update Python code labels Oct 6, 2024
@@ -1525,7 +1525,7 @@ async def _execute_tasks(self, tasks: list[asyncio.Task], lock: asyncio.Lock) ->
for t in tasks[i + 1 :]:
t.cancel()
raise result
if isinstance(result, tuple) and len(result) == 5:
if isinstance(result, tuple) and len(result) == 5: # TODO: what 5 corresponds to ?
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@ogabrielluiz do you know what this corresponds to ?

Copy link
Contributor

Choose a reason for hiding this comment

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

possibly related to the size of the result of this method:

def _update_built_object_and_artifacts(self, result: Any | tuple[Any, dict] | tuple[Component, Any, dict]):

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The tuple shall be VertexBuildResult. I fixed it. PTAL.

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-4032.dmtpw4p5recq1.amplifyapp.com

@cbornet cbornet marked this pull request as draft October 6, 2024 13:40
@cbornet cbornet changed the title Add ruff rules for pylint (PL) ref: Add ruff rules for pylint (PL) Oct 6, 2024
@@ -26,7 +28,7 @@ class UpdateDataComponent(Component):
info="Number of fields to be added to the record.",
real_time_refresh=True,
value=0,
range_spec=RangeSpec(min=1, max=15, step=1, step_type="int"),
range_spec=RangeSpec(min=1, max=MAX_NUMBER_OF_FIELDS, step=1, step_type="int"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Gotta be careful with this because we currently do not eval variables outside the class unless they are import statements

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Got it!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@cbornet cbornet marked this pull request as ready for review October 7, 2024 12:59
@cbornet cbornet requested a review from ogabrielluiz October 7, 2024 20:37
Comment on lines +1528 to +1529
if isinstance(result, VertexBuildResult):
vertices.append(result.vertex)
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes sense, I just don't know how it was working before.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 8, 2024
@cbornet cbornet merged commit f01ea48 into langflow-ai:main Oct 8, 2024
28 checks passed
@cbornet cbornet deleted the ruff-rules-pl branch October 8, 2024 15:56
diogocabral pushed a commit to headlinevc/langflow that referenced this pull request Nov 26, 2024
* Add ruff rules for pylint (PL)

* Changes following review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer python Pull requests that update Python code size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants