Skip to content

Commit 6f1d1a7

Browse files
committed
add back ruff.toml
1 parent dfd8a93 commit 6f1d1a7

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed

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", "UP035", "UP006"]
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 = "double"

0 commit comments

Comments
 (0)