-
Notifications
You must be signed in to change notification settings - Fork 15.7k
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
Merged
efriis
merged 9 commits into
langchain-ai:master
from
dangiankit:text-splitters_pydocstyle_lint
Dec 9, 2024
Merged
text-splitters: add pydocstyle linting #28127
efriis
merged 9 commits into
langchain-ai:master
from
dangiankit:text-splitters_pydocstyle_lint
Dec 9, 2024
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
This was referenced Nov 15, 2024
@efriis and @baskaryan Request to address pending PR review and merge. |
efriis
approved these changes
Dec 9, 2024
dosubot
bot
added
the
lgtm
PR looks good. Use to confirm that a PR is ready for merging.
label
Dec 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
lgtm
PR looks good. Use to confirm that a PR is ready for merging.
🤖: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.