Skip to content

Commit d627fb8

Browse files
authored
Migrate from setup.cfg to pyproject.toml (#6619)
* Drop `setup.cfg` in favor of `pyproject.toml` * Replace flake8 noqa with ruff noqa
1 parent 65434e4 commit d627fb8

File tree

6 files changed

+14
-20
lines changed

6 files changed

+14
-20
lines changed

pyproject.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,13 @@ line-length = 119
1414
[tool.ruff.isort]
1515
lines-after-imports = 2
1616
known-first-party = ["datasets"]
17+
18+
[tool.pytest.ini_options]
19+
# Test fails if a FutureWarning is thrown by `huggingface_hub`
20+
filterwarnings = [
21+
"error::FutureWarning:huggingface_hub*",
22+
]
23+
markers = [
24+
"unit: unit test",
25+
"integration: integration test",
26+
]

setup.cfg

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/datasets/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# flake8: noqa
1+
# ruff: noqa
22
# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,10 +13,6 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
# Lint as: python3
17-
# pylint: enable=line-too-long
18-
# pylint: disable=g-import-not-at-top,g-bad-import-order,wrong-import-position
19-
2016
__version__ = "2.16.2.dev0"
2117

2218
from .arrow_dataset import Dataset

src/datasets/features/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# flake8: noqa
1+
# ruff: noqa
22

33
__all__ = [
44
"Audio",

src/datasets/formatting/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# flake8: noqa
16-
# Lint as: python3
15+
# ruff: noqa
1716

1817
from typing import Dict, List, Optional, Type
1918

src/datasets/utils/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# flake8: noqa
16-
# Lint as: python3
15+
# ruff: noqa
1716

1817
from . import tqdm as _tqdm # _tqdm is the module
1918
from .info_utils import VerificationMode

0 commit comments

Comments
 (0)