Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,24 @@ repos:
name: ruff-check-f401
args: [--select, "F401", --exit-non-zero-on-fix]

- repo: https://github.com/jsh9/pydoclint
rev: "0.8.3"
hooks:
- id: pydoclint
args: [
--style=google,
# Current settings (not because we think they're right, but because we
# don't want a baseline the size of the codebase)
--arg-type-hints-in-docstring=False,
--skip-checking-raises=True,
--check-return-types=False,

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.

looks like return/arg type check are not enabled?

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.

I referred to RAY's set about pydoclint there. Should we enable it?

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.

get it. now only arg name is checked. types are not cheked. let's follow the ray setting :)

--allow-init-docstring=True,
--check-class-attributes=False,
# --check-style-mismatch=True, # Bring this back once things are a bit cleaner
]
types: [python]
files: '^ray_ascend/'

- repo: https://github.com/psf/black
rev: 26.1.0
hooks:
Expand Down
4 changes: 3 additions & 1 deletion ray_ascend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
on Ascend NPU accelerators.
"""

from typing import List

from ray_ascend import _version

__all__ = [
Expand All @@ -17,7 +19,7 @@
__version__ = _version.version


def register_yr_tensor_transport(devices=["npu", "cpu"]) -> None:
def register_yr_tensor_transport(devices: List[str] = ["npu", "cpu"]) -> None:
"""
Register YR tensor transport for Ray and initialize YR backend.

Expand Down
Loading
Loading