Skip to content

Commit 6a7780b

Browse files
committed
more dimension generalization pass
2 parents 61e5ba4 + e8c32ba commit 6a7780b

21 files changed

+822
-715
lines changed

.pre-commit-config.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,25 @@ repos:
33
rev: 23.1.0
44
hooks:
55
- id: black
6-
language_version: python3
6+
language_version: python3
7+
8+
- repo: https://github.com/astral-sh/ruff-pre-commit
9+
rev: v0.14.4
10+
hooks:
11+
- id: ruff-check
12+
args: [--fix, --exit-non-zero-on-fix, --no-cache]
13+
14+
- repo: https://github.com/PFCCLab/typos-pre-commit-mirror.git
15+
rev: v1.39.2
16+
hooks:
17+
- id: typos
18+
args: [--force-exclude]
19+
20+
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
21+
rev: v1.5.1
22+
hooks:
23+
- id: remove-crlf
24+
- id: remove-tabs
25+
name: Tabs remver (Python)
26+
files: (.*\.(py|bzl)|BUILD|.*\.BUILD|WORKSPACE)$
27+
args: [--whitespaces-count, '4']

graph_net/__init__.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
__all__ = ["torch", "paddle"]
2-
3-
from importlib import import_module
4-
from typing import TYPE_CHECKING, Any, List
5-
6-
7-
def __getattr__(name: str) -> Any:
8-
if name in __all__:
9-
module = import_module(f"{__name__}.{name}")
10-
globals()[name] = module
11-
return module
12-
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
13-
14-
15-
def __dir__() -> List[str]:
16-
return sorted(list(globals().keys()) + __all__)
17-
18-
19-
if TYPE_CHECKING:
20-
from . import torch as torch # type: ignore
21-
from . import paddle as paddle # type: ignore
1+
__all__ = ["torch", "paddle"]
2+
3+
from importlib import import_module
4+
from typing import TYPE_CHECKING, Any, List
5+
6+
7+
def __getattr__(name: str) -> Any:
8+
if name in __all__:
9+
module = import_module(f"{__name__}.{name}")
10+
globals()[name] = module
11+
return module
12+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
13+
14+
15+
def __dir__() -> List[str]:
16+
return sorted(list(globals().keys()) + __all__)
17+
18+
19+
if TYPE_CHECKING:
20+
from . import torch as torch # type: ignore
21+
from . import paddle as paddle # type: ignore

0 commit comments

Comments
 (0)