Skip to content

Commit

Permalink
Update ruff. Fix and enable PLE lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Skylion007 committed Feb 22, 2024
1 parent c0a9697 commit c1cb3f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.0.282
rev: v0.2.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
2 changes: 1 addition & 1 deletion composer/profiler/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@ def export_memory_timeline_html(prof: TorchProfile,

with open(path, 'w') as f:
f.write(html)
log.debug('Memory timeline exported to', path, '.')
log.debug('Memory timeline exported to %s.', path)
remove(tmpfile.name)
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,21 @@ line_length = 120
skip = [ "env", "wandb", "runs", "build", "node_modules" ]
known_third_party = ["wandb"]

[tool.ruff]
[tool.ruff.lint]
select = [
"C4",
# TODO port pydocstyle
# "D", # pydocstyle
"PERF",
"PLE",
]

ignore = [
"C408",
"PERF2",
"PERF4",
]
[tool.ruff]
exclude = [
"build/**",
"docs/**",
Expand Down

0 comments on commit c1cb3f0

Please sign in to comment.