Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ __pycache__
/result.md
/artifacts
.python-version
.worktrees/
4 changes: 1 addition & 3 deletions adopt_ruff/models/ruff_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ def all_rules(self) -> set[Rule]:


def _parse_raw_rules(raw_codes: set[str], rules: set[Rule]) -> set[Rule]:
"""
Convert code values (E401), categories (E) and ALL, into Rule objects
"""
"""Convert code values (E401), categories (E) and ALL, into Rule objects."""
if "ALL" in raw_codes:
return rules

Expand Down
9 changes: 2 additions & 7 deletions adopt_ruff/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ def output_table(
collapsible: bool,
collapsible_summary: str = "Details",
) -> None:
"""
Creates a markdown table, and saves to a CSV
"""

"""Creates a markdown table, and saves to a CSV."""
md_table = tabulate(
[make_name_clickable(item) for item in items],
tablefmt="github",
Expand All @@ -72,9 +69,7 @@ def make_name_clickable(item: dict) -> dict:


def search_config_file(path: Path) -> Path | None:
"""
Searches for common configuration files under the given directory.
"""
"""Searches for common configuration files under the given directory."""
for name in ("pyproject.toml", "ruff.toml", ".ruff.toml"):
if (file_path := path / name).exists():
logger.info(f"found config file at {file_path.resolve()!s}")
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ target-version = "py311"
select = ["ALL"]
ignore = [
"ISC001",
"ANN",
"ANN201",
"ANN202",
"D",
"DTZ",
"COM812",
"EM102",
"TRY003",
Expand Down
Loading