-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pre-commit.ci] pre-commit autoupdate (#125)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](pre-commit/pre-commit-hooks@v4.5.0...v4.6.0) - [github.com/astral-sh/ruff-pre-commit: v0.3.5 → v0.5.0](astral-sh/ruff-pre-commit@v0.3.5...v0.5.0) * use ruff.toml and lint --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Çağtay Fabry <[email protected]>
- Loading branch information
1 parent
c8c343f
commit 3cc86be
Showing
9 changed files
with
101 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Exclude a variety of commonly ignored directories. | ||
extend-exclude = [ | ||
"__init__.py", | ||
] | ||
|
||
# Same as Black. | ||
line-length = 88 | ||
indent-width = 4 | ||
|
||
# Assume Python 3.9 | ||
target-version = "py39" | ||
|
||
|
||
[lint] | ||
# TODO: should be the following list, but Ruff does not yet impl all of them. | ||
# W503,W504 | ||
# E203 | ||
# C408 | ||
ignore = [ | ||
"C408", | ||
#"E203", | ||
"E402", | ||
#"W503", | ||
#"W504", | ||
"D203", | ||
"D211", | ||
"D213", | ||
"UP006", | ||
"UP007", # see ruff GH#4427 | ||
] | ||
select = [ | ||
"B", # flake8-bugbear | ||
"C", # flake8-comprehensions | ||
#"D", # note: all relevant D's will be set by setting pydocstyle.convention=numpy! | ||
"E", # pycodestyles | ||
"F", # pyflakes | ||
"W", # pycodestyle warnings | ||
"UP", # pyupgrade | ||
"T2", # flake8-print | ||
"I001", # isort | ||
"ICN", # import conventions, e.g. import numpy as np | ||
#"B950", # not yet implemented by Ruff. | ||
"RUF100", # ensure 'noqa' declarations are still valid. | ||
] | ||
|
||
[lint.pydocstyle] | ||
convention = "numpy" | ||
|
||
[lint.mccabe] | ||
max-complexity = 15 # max branches inside a function. | ||
|
||
[lint.isort] | ||
known-first-party = [ | ||
"weldx", | ||
"weldx_widgets", | ||
] | ||
required-imports = [ | ||
"from __future__ import annotations", | ||
] | ||
|
||
[flake8-import-conventions] | ||
extend-aliases = { xarray = "xr" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
"""Type aliases shared in visualization package.""" | ||
|
||
from typing import List, Tuple, Union | ||
from typing import Union | ||
|
||
import pandas as pd | ||
|
||
types_timeindex = Union[pd.DatetimeIndex, pd.TimedeltaIndex, List[pd.Timestamp]] | ||
types_limits = Union[List[Tuple[float, float]], Tuple[float, float]] | ||
types_timeindex = Union[pd.DatetimeIndex, pd.TimedeltaIndex, list[pd.Timestamp]] | ||
types_limits = Union[list[tuple[float, float]], tuple[float, float]] | ||
|
||
__all__ = ("types_timeindex", "types_limits") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters