Skip to content

Commit 2ea9899

Browse files
committed
lint
1 parent 2bcc976 commit 2ea9899

2 files changed

Lines changed: 33 additions & 35 deletions

File tree

pyproject.toml

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,42 @@ packages.find.where = [
105105

106106
[tool.nbqa]
107107
# enable setuptools-scm versioning
108-
109108
addopts.ruff = [
110109
"--extend-ignore=B018",
111110
]
112111

112+
[tool.mypy]
113+
python_version = "3.9"
114+
files = "weldx"
115+
ignore_missing_imports = true # TODO: this is bad!
116+
strict_optional = false
117+
pretty = true
118+
allow_redefinition = true
119+
show_error_context = true
120+
show_error_codes = true
121+
show_column_numbers = true
122+
sqlite_cache = true
123+
124+
# MyPy per-module options:
125+
[[tool.mypy.overrides]]
126+
module = [
127+
"weldx.asdf.*",
128+
"weldx.tags.*",
129+
"weldx.tests.*",
130+
"weldx.welding.groove.*",
131+
"weldx.geometry.*",
132+
]
133+
ignore_errors = true
134+
135+
# this is a workaround for an xarray related mypy bug
136+
# see https://github.com/python/mypy/pull/9495
137+
# and https://github.com/space-physics/msise00/commit/8b59a9383dd6fcc54b7dac74eb95a350308d7b62
138+
# TODO: is this still mandatory?
139+
[[tool.mypy.overrides]]
140+
module = "xarray"
141+
follow_imports = "skip"
142+
ignore_errors = true
143+
113144
[tool.pytest]
114145
ini_options.addopts = "--tb=short --color=yes -rsw --cov=weldx --cov-report=term-missing:skip-covered --doctest-modules"
115146
# addopts = --tb=short --color=yes -rs -p no:cov
@@ -146,36 +177,3 @@ report.exclude_lines = [
146177
report.omit = [
147178
"weldx/tests/*",
148179
]
149-
150-
[tool.mypy]
151-
python_version = "3.9"
152-
files = "weldx"
153-
ignore_missing_imports = true # TODO: this is bad!
154-
strict_optional = false
155-
pretty = true
156-
allow_redefinition = true
157-
show_error_context = true
158-
show_error_codes = true
159-
show_column_numbers = true
160-
sqlite_cache = true
161-
162-
# MyPy per-module options:
163-
[[tool.mypy.overrides]]
164-
module = [
165-
"weldx.asdf.*",
166-
"weldx.tags.*",
167-
"weldx.tests.*",
168-
"weldx.welding.groove.*",
169-
"weldx.geometry.*",
170-
]
171-
ignore_errors = true
172-
173-
# this is a workaround for an xarray related mypy bug
174-
# see https://github.com/python/mypy/pull/9495
175-
# and https://github.com/space-physics/msise00/commit/8b59a9383dd6fcc54b7dac74eb95a350308d7b62
176-
# TODO: is this still mandatory?
177-
178-
[[tool.mypy.overrides]]
179-
module = "xarray"
180-
follow_imports = "skip"
181-
ignore_errors = true

weldx/schemas/weldx.bam.de/weldx/time/timestamp-0.1.0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ examples:
2323
!<asdf://weldx.bam.de/weldx/tags/time/timestamp-0.1.0> 2020-01-01T12:00:00+01:00
2424
2525
type: string
26-
pattern: "[0-9]{4}-(0[1-9])|(1[0-2])-(0[1-9])|([1-2][0-9])|(3[0-1])[T ]([0-1][0-9])|(2[0-4]):[0-5][0-9]:[0-5][0-9](.[0-9]+)?"# pattern string does not seem to work correctly.. ?
26+
pattern: "[0-9]{4}-(0[1-9])|(1[0-2])-(0[1-9])|([1-2][0-9])|(3[0-1])[T ]([0-1][0-9])|(2[0-4]):[0-5][0-9]:[0-5][0-9](.[0-9]+)?" # pattern string does not seem to work correctly.. ?
2727
# the pattern is taken from asdf time but incomplete, still keep it for now
2828
# maybe convert the following: https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/
2929
...

0 commit comments

Comments
 (0)