Skip to content

Commit

Permalink
[tool.ruff.per-file-ignores] "**/schemas/*" = ["TCH"]
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Jul 28, 2023
1 parent 7c9d3b3 commit 683a9ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -171,19 +171,21 @@ select = [
"YTT", # flake8-2020
]
ignore = [
"PD011", # pandas-use-of-dot-values
"PLR", # pylint-refactor
"PT004", # pytest-missing-fixture-name-underscore
"PT006", # pytest-parametrize-names-wrong-type
"RUF013", # implicit-optional
# TODO remove PT011, pytest.raises() should always check err msg
"PD011", # pandas-use-of-dot-values
"PERF203", # try-except-in-loop
"PT011", # pytest-raises-too-broad
"PT013", # pytest-incorrect-pytest-import
"PLR", # pylint-refactor
"PT004", # pytest-missing-fixture-name-underscore
"PT006", # pytest-parametrize-names-wrong-type
"RUF013", # implicit-optional
# TODO remove PT011, pytest.raises() should always check err msg
"PT011", # pytest-raises-too-broad
"PT013", # pytest-incorrect-pytest-import
]
pydocstyle.convention = "numpy"
isort.known-first-party = ["atomate2"]

[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"]
"**/tests/*" = ["D"]
# things inside TYPE_CHECKING aren't available at runtime and so can't be used by pydantic models
"**/schemas/*" = ["TCH"]
2 changes: 1 addition & 1 deletion src/atomate2/utils/file_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def abspath(self, path: str | Path, host: str | None = None) -> Path:
return Path(path).absolute()
ssh = self.get_ssh(host)
_, stdout, _ = ssh.exec_command(f"readlink -f {path}")
return Path([o.split("\n")[0] for o in stdout][0])
return Path(next(o.split("\n")[0] for o in stdout))

def glob(self, path: str | Path, host: str | None = None) -> list[Path]:
"""
Expand Down

0 comments on commit 683a9ea

Please sign in to comment.