Skip to content

Commit 451cdba

Browse files
authored
Move Ruff configuration to separate config file (#619)
Dependabot stopped working after merging: b829737 This broke dependabot since it is now encountering issues: https://github.com/apache/iceberg-python/security/dependabot/16 I think it is good to just move the Ruff config to a separate file.
1 parent c9b6c1b commit 451cdba

File tree

2 files changed

+83
-64
lines changed

2 files changed

+83
-64
lines changed

pyproject.toml

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -779,67 +779,3 @@ ignore_missing_imports = true
779779

780780
[tool.coverage.run]
781781
source = ['pyiceberg/']
782-
783-
[tool.ruff]
784-
src = ['pyiceberg','tests']
785-
extend-exclude = ["dev/provision.py"]
786-
lint.select = [
787-
"E", # pycodestyle
788-
"W", # pycodestyle
789-
"F", # Pyflakes
790-
"B", # flake8-bugbear
791-
"PIE", # flake8-pie
792-
"C4", # flake8-comprehensions
793-
"I", # isort
794-
"UP", # pyupgrade
795-
]
796-
lint.ignore = ["E501","E203","B024","B028","UP037"]
797-
798-
# Allow autofix for all enabled rules (when `--fix`) is provided.
799-
lint.fixable = ["ALL"]
800-
lint.unfixable = []
801-
802-
# Exclude a variety of commonly ignored directories.
803-
exclude = [
804-
".bzr",
805-
".direnv",
806-
".eggs",
807-
".git",
808-
".git-rewrite",
809-
".hg",
810-
".mypy_cache",
811-
".nox",
812-
".pants.d",
813-
".pytype",
814-
".ruff_cache",
815-
".svn",
816-
".tox",
817-
".venv",
818-
"__pypackages__",
819-
"_build",
820-
"buck-out",
821-
"build",
822-
"dist",
823-
"node_modules",
824-
"venv",
825-
]
826-
lint.per-file-ignores = {}
827-
# Ignore _all_ violations.
828-
# Same as Black.
829-
line-length = 130
830-
831-
# Allow unused variables when underscore-prefixed.
832-
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
833-
834-
[tool.ruff.lint.pyupgrade]
835-
# Preserve types, even if a file imports `from __future__ import annotations`.
836-
keep-runtime-typing = true
837-
838-
[tool.ruff.lint.isort]
839-
detect-same-package = true
840-
lines-between-types = 0
841-
known-first-party = ["pyiceberg", "tests"]
842-
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
843-
844-
[tool.ruff.format]
845-
quote-style = "preserve"

ruff.toml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
src = ['pyiceberg','tests']
19+
extend-exclude = ["dev/provision.py"]
20+
21+
# Exclude a variety of commonly ignored directories.
22+
exclude = [
23+
".bzr",
24+
".direnv",
25+
".eggs",
26+
".git",
27+
".git-rewrite",
28+
".hg",
29+
".mypy_cache",
30+
".nox",
31+
".pants.d",
32+
".pytype",
33+
".ruff_cache",
34+
".svn",
35+
".tox",
36+
".venv",
37+
"__pypackages__",
38+
"_build",
39+
"buck-out",
40+
"build",
41+
"dist",
42+
"node_modules",
43+
"venv",
44+
]
45+
46+
# Ignore _all_ violations.
47+
# Same as Black.
48+
line-length = 130
49+
50+
[lint]
51+
select = [
52+
"E", # pycodestyle
53+
"W", # pycodestyle
54+
"F", # Pyflakes
55+
"B", # flake8-bugbear
56+
"PIE", # flake8-pie
57+
"C4", # flake8-comprehensions
58+
"I", # isort
59+
"UP", # pyupgrade
60+
]
61+
ignore = ["E501","E203","B024","B028","UP037"]
62+
63+
# Allow autofix for all enabled rules (when `--fix`) is provided.
64+
fixable = ["ALL"]
65+
unfixable = []
66+
67+
per-file-ignores = {}
68+
69+
# Allow unused variables when underscore-prefixed.
70+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
71+
72+
[lint.pyupgrade]
73+
# Preserve types, even if a file imports `from __future__ import annotations`.
74+
keep-runtime-typing = true
75+
76+
[lint.isort]
77+
detect-same-package = true
78+
lines-between-types = 0
79+
known-first-party = ["pyiceberg", "tests"]
80+
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
81+
82+
[format]
83+
quote-style = "preserve"

0 commit comments

Comments
 (0)