Skip to content

Commit b2b2256

Browse files
committed
Lint fixes #1 torchao/dtypes (#827)
* Lint fixes; * Ruff auto-format
1 parent 87ce389 commit b2b2256

File tree

9 files changed

+694
-263
lines changed

9 files changed

+694
-263
lines changed

ruff.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# We plan to add files in chunks using the 'include' list below.
33
# To add a new path: Simply add it to the 'include' list.
44
# Example: To lint all files in every subfolder of 'test', add "test/**/*"
5+
# To exclude a file type: Simply add it to the 'include' list.
6+
# Example: To lint all files in every subfolder of 'test', add "test/**/*"
57
include = [
68
"torchao/float8/inference.py",
79
"torchao/float8/float8_utils.py",
@@ -10,4 +12,9 @@ include = [
1012
"torchao/float8/float8_tensor.py",
1113
"torchao/quantization/linear_activation_weight_observer.py",
1214
"test/quantization/test_observer.py",
15+
"torchao/dtypes/*"
16+
]
17+
18+
exclude = [
19+
"**/*.md"
1320
]

torchao/dtypes/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from .nf4tensor import NF4Tensor, to_nf4
2+
23
# from ..prototype.dtypes.uint2 import UInt2Tensor, BitnetTensor
34
from .uint4 import UInt4Tensor
45
from .affine_quantized_tensor import (
@@ -21,7 +22,7 @@
2122
__all__ = [
2223
"NF4Tensor",
2324
"to_nf4",
24-
"UInt4Tensor"
25+
"UInt4Tensor",
2526
"AffineQuantizedTensor",
2627
"to_affine_quantized_intx",
2728
"to_affine_quantized_intx_static",

0 commit comments

Comments
 (0)