-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
text-splitters: add pydocstyle linting #28127
Open
dangiankit
wants to merge
8
commits into
langchain-ai:master
Choose a base branch
from
dangiankit:text-splitters_pydocstyle_lint
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
text-splitters: add pydocstyle linting #28127
dangiankit
wants to merge
8
commits into
langchain-ai:master
from
dangiankit:text-splitters_pydocstyle_lint
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added a `# noqa: D100` directive to suppress the missing module docstring error for the `__future__` annotations import. This resolves the linter issue while maintaining compliance with pydocstyle.
Fixed the following pydocstyle issues: - D202: Removed blank lines following function docstrings. - D205: Added a blank line between the summary line and description. - D209: Ensured multi-line docstring closing quotes are on a separate line. - D212: Adjusted multi-line docstring summary to start on the first line. - D212: Ensured multi-line docstring summaries start on the first line. - D415: Updated the first line of docstrings to end with a period, question mark, or exclamation point. These changes align the code with PEP 257 guidelines and improve docstring consistency.
…or `__init__` Resolved the following pydocstyle errors: - D107: Added a docstring to the `__init__` method to describe its purpose. - D417: Included a description for the `**kwargs` argument in the `__init__` docstring. These changes ensure compliance with PEP 257 and improve code clarity by documenting the constructor and its parameters.
Added a docstring to address the `D101` pydocstyle error, documenting the purpose and functionality of the affected public class. This ensures compliance with PEP 257 and improves code clarity.
Added missing docstrings to public methods to resolve `D102` pydocstyle errors. These updates ensure compliance with PEP 257 and improve code documentation and readability.
Added `# type: ignore[attr-defined]` to suppress the `mypy` error: "PageElement" has no attribute 'name'. This fix resolves the immediate issue while maintaining compatibility with BeautifulSoup and ensuring the code passes type checks.
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
dosubot
bot
added
size:L
This PR changes 100-499 lines, ignoring generated files.
Ɑ: text splitters
Related to text splitters package
🤖:nit
Small modifications/deletions, fixes, deps or improvements to existing code or docs
labels
Nov 15, 2024
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🤖:nit
Small modifications/deletions, fixes, deps or improvements to existing code or docs
size:L
This PR changes 100-499 lines, ignoring generated files.
Ɑ: text splitters
Related to text splitters package
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As seen in #23188, turned on Google-style docstrings by enabling
pydocstyle
linting in thetext-splitters
package. Each resulting linting error was addressed differently: ignored, resolved, suppressed, and missing docstrings were added.Fixes one of the checklist items from #25154, similar to #25939 in
core
package. Ranmake format
,make lint
andmake test
from the root of the packagetext-splitters
to ensure no issues were found.