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
[MAINTENANCE] Lint Docs #8936
[MAINTENANCE] Lint Docs #8936
Conversation
✅ Deploy Preview for niobium-lead-7998 canceled.
|
@anthonyburdi if I wanted to manually test these changes, what we be the best way to do that? Or would you expect the CI to fail if something was off? |
docs/ruff.toml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want different linting rules for the docs code we can customize it in this file
def _get_os_path(self, path: str) -> str: | ||
"""Gets an os-specific path from a path found in a markdown file""" | ||
return path.replace("/", os.path.sep) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need this method at all if using pathlib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for making these updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙇🏼
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #8936 +/- ##
========================================
Coverage 82.55% 82.55%
========================================
Files 511 511
Lines 46381 46381
========================================
Hits 38288 38288
Misses 8093 8093
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
for more information, see https://pre-commit.ci
Enable linting for the docs directory code.
Mostly involved swapping
os.path
andglob
usage withpathlib.Path
methods.Also enabled type-checking for some docs related modules.
invoke lint
(usesblack
+ruff
)For more information about contributing, see Contribute.
After you submit your PR, keep the page open and monitor the statuses of the various checks made by our continuous integration process at the bottom of the page. Please fix any issues that come up and reach out on Slack if you need help. Thanks for contributing!