Skip to content

chore(langchain): add ruff rules SLF#32112

Merged
Eugene Yurtsev (eyurtsev) merged 2 commits intolangchain-ai:masterfrom
cbornet:langchain-ruff-slf
Jul 25, 2025
Merged

chore(langchain): add ruff rules SLF#32112
Eugene Yurtsev (eyurtsev) merged 2 commits intolangchain-ai:masterfrom
cbornet:langchain-ruff-slf

Conversation

@cbornet
Copy link
Copy Markdown
Collaborator

@cbornet Christophe Bornet (cbornet) commented Jul 19, 2025

@vercel
Copy link
Copy Markdown

vercel bot commented Jul 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Jul 23, 2025 3:45pm

)
try:
while self.agent_executor._should_continue(
while self.agent_executor._should_continue( # noqa: SLF001
Copy link
Copy Markdown
Collaborator Author

@cbornet Christophe Bornet (cbornet) Jul 19, 2025

Choose a reason for hiding this comment

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

It's OK for AgentExecutorIterator to access private members of AgentExecutor

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Jul 19, 2025

CodSpeed WallTime Performance Report

Merging #32112 will not alter performance

Comparing cbornet:langchain-ruff-slf (c4ad5f6) with master (a7d0e42)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 13 untouched benchmarks

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Jul 19, 2025

CodSpeed Instrumentation Performance Report

Merging #32112 will not alter performance

Comparing cbornet:langchain-ruff-slf (c4ad5f6) with master (a7d0e42)

Summary

✅ 14 untouched benchmarks

@sydney-runkle
Copy link
Copy Markdown
Collaborator

Nit - probably not really a feature, right? More like a chore?

return cls(llm=llm, prompt=prompt_template)

def _get_num_tokens(self, text: str) -> int:
def get_num_tokens(self, text: str) -> int:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This shouldn't be made public. We don't want more users accessing this

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

OK. Is it because all the using classes are deprecated ?
I see that BaseQAWithSourcesChain is deprecated but not some of its subclasses (VectorDBQAWithSourcesChain and RetrievalQAWithSourcesChain). Shouldn't they be deprecated as well ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

@eyurtsev Eugene Yurtsev (eyurtsev) changed the title feat(langchain): add ruff rules SLF chore(langchain): add ruff rules SLF Jul 23, 2025
@eyurtsev Eugene Yurtsev (eyurtsev) merged commit e1238b8 into langchain-ai:master Jul 25, 2025
29 checks passed
@cbornet Christophe Bornet (cbornet) deleted the langchain-ruff-slf branch July 25, 2025 16:05
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.

4 participants