-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
175 lines (158 loc) · 5.59 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
[build-system]
requires = [
"setuptools",
"wheel"
]
build-backend = "setuptools.build_meta"
[project]
name = "airflow-provider-sap-hana"
keywords = [ "airflow", "hana", "sap hana", "sap-hana"]
requires-python = ">=3.9"
authors = [
{ name = "Jonathan Takish", email = "[email protected]" }
]
license = { text = "Apache License 2.0" }
description = "An Airflow provider to connect to SAP HANA"
classifiers = [
"Framework :: Apache Airflow",
"Framework :: Apache Airflow :: Provider"
]
dynamic = [
"version"
]
dependencies = [
"apache-airflow>=2.9.0",
"hdbcli>=2.23.24",
"sqlalchemy-hana>=3.0.0"
]
[project.urls]
Source = "https://github.com/j6takish/airflow-provider-sap-hana"
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.entry-points.apache_airflow_provider]
provider_info = "airflow_provider_sap_hana.__init__:get_provider_info"
[tool.setuptools]
include-package-data = false
[tool.setuptools.dynamic]
version = { attr = "airflow_provider_sap_hana.__version__" }
[tool.setuptools.packages.find]
where = ["src"]
include = [
"airflow_provider_sap_hana*"
]
## ruff settings ##
[tool.ruff]
target-version = "py39"
line-length = 110
extend-exclude = [
".eggs",
"*/_vendor/*",
"tests/dags/test_imports.py",
]
[tool.ruff.lint]
typing-modules = ["airflow.typing_compat"]
extend-select = [
# Enable entire ruff rule section
"I", # Missing required import (auto-fixable)
"UP", # Pyupgrade
"ASYNC", # subset of flake8-async rules
"ISC", # Checks for implicit literal string concatenation (auto-fixable)
"TC", # Rules around TYPE_CHECKING blocks
"G", # flake8-logging-format rules
"LOG", # flake8-logging rules, most of them autofixable
"PT", # flake8-pytest-style rules
"TID25", # flake8-tidy-imports rules
"E", # pycodestyle rules
"W", # pycodestyle rules
# Per rule enables
"RUF006", # Checks for asyncio dangling task
"RUF015", # Checks for unnecessary iterable allocation for first element
"RUF019", # Checks for unnecessary key check
"RUF100", # Unused noqa (auto-fixable)
# We ignore more pydocstyle than we enable, so be more selective at what we enable
"D1",
"D2",
"D213", # Conflicts with D212. Both can not be enabled.
"D3",
"D400",
"D401",
"D402",
"D403",
"D412",
"D419",
"PGH004", # Use specific rule codes when using noqa
"PGH005", # Invalid unittest.mock.Mock methods/attributes/properties
"S101", # Checks use `assert` outside the test cases, test cases should be added into the exclusions
"SIM300", # Checks for conditions that position a constant on the left-hand side of the comparison
# operator, rather than the right-hand side.
"B004", # Checks for use of hasattr(x, "__call__") and replaces it with callable(x)
"B006", # Checks for uses of mutable objects as function argument defaults.
"B007", # Checks for unused variables in the loop
"B017", # Checks for pytest.raises context managers that catch Exception or BaseException.
"B019", # Use of functools.lru_cache or functools.cache on methods can lead to memory leaks
"B028", # No explicit stacklevel keyword argument found
"TRY002", # Prohibit use of `raise Exception`, use specific exceptions instead.
]
ignore = [
"D100", # Unwanted; Docstring at the top of every file.
"D102", # TODO: Missing docstring in public method
"D103", # TODO: Missing docstring in public function
"D104", # Unwanted; Docstring at the top of every `__init__.py` file.
"D105", # Unwanted; See https://lists.apache.org/thread/8jbg1dd2lr2cfydtqbjxsd6pb6q2wkc3
"D107", # Unwanted; Docstring in every constructor is unnecessary if the class has a docstring.
"D203",
"D212", # Conflicts with D213. Both can not be enabled.
"E731", # Do not assign a lambda expression, use a def
"TC003", # Do not move imports from stdlib to TYPE_CHECKING block
"PT006", # Wrong type of names in @pytest.mark.parametrize
"PT007", # Wrong type of values in @pytest.mark.parametrize
"PT013", # silly rule prohibiting e.g. `from pytest import param`
"PT011", # pytest.raises() is too broad, set the match parameter
"PT019", # fixture without value is injected as parameter, use @pytest.mark.usefixtures instead
# Rules below explicitly set off which could overlap with Ruff's formatter
# as it recommended by https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
# Except ISC rules
"W191",
"E111",
"E114",
"E117",
"D206",
"D300",
"Q000",
"Q001",
"Q002",
"Q003",
"COM812",
"COM819",
"E501", # Formatted code may exceed the line length, leading to line-too-long (E501) errors.
"ASYNC110", # TODO: Use `anyio.Event` instead of awaiting `anyio.sleep` in a `while` loop
]
unfixable = [
# PT022 replace empty `yield` to empty `return`. Might be fixed with a combination of PLR1711
# In addition, it can't do anything with invalid typing annotations, protected by mypy.
"PT022",
]
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]
combine-as-imports = true
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder",
"testing"
]
[tool.ruff.lint.flake8-type-checking]
exempt-modules = ["typing", "typing_extensions"]
[tool.ruff.lint.flake8-pytest-style]
mark-parentheses = false
fixture-parentheses = false
[tool.ruff.lint.extend-per-file-ignores]
"tests/**/*.py" = [
"S101", # asserts allowed in tests...
"D101", # Missing docstring in public class
]