Skip to content

Commit

Permalink
Merge pull request #90 from jorenham/maint/ruff-0.7.0
Browse files Browse the repository at this point in the history
bump `ruff` to `0.7.0`, and enable `ANN`
  • Loading branch information
jorenham authored Oct 17, 2024
2 parents 288f751 + 9c585f3 commit 796d586
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ repos:
- id: markdownlint

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
rev: v0.7.0
hooks:
- id: ruff
args: [--fix, --show-fixes]
Expand Down
40 changes: 20 additions & 20 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ optype = "^0.6.1"
[tool.poetry.group.lint.dependencies]
basedmypy = "^2.6.0"
basedpyright = "^1.19.0"
ruff = "^0.6.9"
ruff = "^0.7.0"

[tool.poetry.group.dev.dependencies]
poethepoet = "^0.29.0"
Expand Down Expand Up @@ -137,7 +137,6 @@ skip-magic-trailing-comma = false

[tool.ruff.lint]
ignore = [
"ANN", # TODO
"E741",
"COM812", # ruff format compat
"PYI054", # numeric-literal-too-long
Expand Down Expand Up @@ -191,13 +190,11 @@ banned-from = [
"optype.typing",
]
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
"ctypes" = "ct"
"datetime" = "dt"
"numpy" = "np"
"numpy.polynomial" = "npp"
"numpy.typing" = "npt"
"optype" = "op"
"optype.numpy" = "onpt"
"scipy" = "sp"
"scipy._typing" = "spt"

[tool.ruff.lint.isort]
combine-as-imports = true
Expand Down
2 changes: 1 addition & 1 deletion scipy-stubs/io/arff/_arffread.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ def read_relational_attribute(ofile: Iterator[str], relational_attribute: Relati
def read_header(ofile: Iterator[str]) -> tuple[str, list[Attribute]]: ...
def loadarff(f: FileLike[str]) -> tuple[npt.NDArray[np.void], MetaData]: ...
def basic_stats(data: npt.NDArray[np.number[Any]]) -> tuple[np.number[Any], np.number[Any], np.number[Any], np.number[Any]]: ...
def print_attribute(name: str, tp: Attribute, data: Any) -> None: ...
def print_attribute(name: str, tp: Attribute, data: npt.NDArray[np.number[Any]]) -> None: ...
def test_weka(filename: FileName) -> None: ...
2 changes: 1 addition & 1 deletion scipy-stubs/sparse/_sputils.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ def check_shape(
def check_reshape_kwargs(kwargs: _ReshapeKwargs) -> Literal["C", "F"] | bool: ...

#
def convert_pydata_sparse_to_scipy(arg: Any, target_format: Literal["csc", "csr"] | None = None) -> object | spmatrix: ...
def convert_pydata_sparse_to_scipy(arg: object, target_format: Literal["csc", "csr"] | None = None) -> object | spmatrix: ...
def matrix(*args: Untyped, **kwargs: Untyped) -> Untyped: ...
def asmatrix(data: Untyped, dtype: Untyped | None = None) -> Untyped: ...

0 comments on commit 796d586

Please sign in to comment.