-
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.
- Loading branch information
1 parent
8423cc3
commit eb1a866
Showing
9 changed files
with
99 additions
and
99 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,5 +23,8 @@ repos: | |
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
args: | ||
- --quiet | ||
- --fix | ||
# Run the formatter. | ||
- id: ruff-format |
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