Skip to content

Commit 6640b24

Browse files
committed
configure ruff
1 parent bb33e88 commit 6640b24

File tree

5 files changed

+22
-21
lines changed

5 files changed

+22
-21
lines changed

ruff.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ select = [
3939
"NPY",
4040
]
4141

42-
[isort]
43-
profile = "black"
44-
4542
ignore = [
4643
"D104", # Missing docstring in public package
4744
"D100", # Missing docstring in public module
@@ -60,6 +57,12 @@ ignore = [
6057
"D206", # Docstrings should be indented with spaces; unnecessary when running ruff-format
6158
"E501", # Line length too long; unnecessary when running ruff-format
6259
"W191", # Indentation contains tabs; unnecessary when running ruff-format
60+
61+
# REMOVE AFTER FIXING
62+
"ANN001", # Missing type annotation for function argument `args`
63+
"ANN202", # Missing Missing return type annotation for private function
64+
"D103", # Missing docstring in public function
65+
"D101", # Missing docstring in public class
6366
]
6467

6568

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
import shutil
1919
import subprocess
2020

21-
import setuptools
22-
from setuptools import find_packages
23-
from setuptools import setup
24-
2521
# pylint: disable=g-bad-import-order
2622
# It is recommended to import setuptools prior to importing distutils to avoid
2723
# using legacy behavior from distutils.
2824
# https://setuptools.readthedocs.io/en/latest/history.html#v48-0-0
2925
from distutils.command import build
26+
27+
import setuptools
28+
from setuptools import find_packages, setup
29+
3030
# pylint: enable=g-bad-import-order
3131

3232

tensorflow_metadata/proto/__init__.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313
# limitations under the License.
1414
"""Init module for tf.Metadata protos."""
1515

16-
from tensorflow_metadata.proto.v0 import anomalies_pb2 # noqa: F401
17-
from tensorflow_metadata.proto.v0 import derived_feature_pb2 # noqa: F401
18-
from tensorflow_metadata.proto.v0 import metric_pb2 # noqa: F401
19-
from tensorflow_metadata.proto.v0 import path_pb2 # noqa: F401
20-
from tensorflow_metadata.proto.v0 import problem_statement_pb2 # noqa: F401
21-
from tensorflow_metadata.proto.v0 import schema_pb2 # noqa: F401
22-
from tensorflow_metadata.proto.v0 import statistics_pb2 # noqa: F401
16+
from tensorflow_metadata.proto.v0 import (
17+
anomalies_pb2,
18+
derived_feature_pb2,
19+
metric_pb2,
20+
path_pb2,
21+
problem_statement_pb2,
22+
schema_pb2,
23+
statistics_pb2,
24+
)

tensorflow_metadata/python/proto_test.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@
1313
# limitations under the License.
1414
"""Tests for tensorflow_metadata.python.proto."""
1515

16-
from __future__ import absolute_import
17-
from __future__ import division
18-
from __future__ import print_function
19-
2016
from absl.testing import absltest
17+
2118
from tensorflow_metadata.proto.v0 import schema_pb2
2219

2320

tools/build_tfmd_docs.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@
2525
2626
"""
2727

28-
from absl import app
29-
from absl import flags
30-
28+
from absl import app, flags
3129
from tensorflow_docs.api_generator import generate_lib
30+
3231
import tensorflow_metadata as tfmd
3332

3433
# `.proto` (which contains all the classes) is not imported by default

0 commit comments

Comments
 (0)