Skip to content

Commit edff166

Browse files
committed
Merge branch 'main' of github.com:apache/iceberg-python into fd-add-ability-to-delete-full-data-files
2 parents 9c6724e + 451cdba commit edff166

File tree

3 files changed

+85
-65
lines changed

3 files changed

+85
-65
lines changed

pyproject.toml

Lines changed: 1 addition & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ pytest-mock = "3.12.0"
8787
pyspark = "3.5.0"
8888
cython = "3.0.8"
8989
deptry = "^0.14.0"
90+
docutils = "!=0.21"
9091

9192
[[tool.mypy.overrides]]
9293
module = "pytest_mock.*"
@@ -778,67 +779,3 @@ ignore_missing_imports = true
778779

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

tests/expressions/test_literals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def test_decimal_to_decimal_conversion() -> None:
275275

276276

277277
def test_timestamp_to_date() -> None:
278-
epoch_lit = TimestampLiteral(int(datetime.datetime.fromisoformat("1970-01-01T01:23:45.678").timestamp() * 1_000_000))
278+
epoch_lit = TimestampLiteral(int(datetime.datetime.fromisoformat("1970-01-01T00:00:00.000000+00:00").timestamp() * 1_000_000))
279279
date_lit = epoch_lit.to(DateType())
280280

281281
assert date_lit.value == 0

0 commit comments

Comments
 (0)