Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#401)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Feb 8, 2024
1 parent d091b7c commit f22ddb0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
- id: check-docstring-first

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
rev: v0.2.0
hooks:
- id: ruff
- id: ruff-format
18 changes: 10 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,17 @@ sphinx-rtd-theme = "^1.0.0"

[tool.ruff]
fix = true
target-version = "py38"
line-length = 88
extend-exclude = [
"docs/*",
"tests/fixtures/exceptions/*"
]

[tool.ruff.lint]
unfixable = [
"ERA", # do not autoremove commented out code
]
target-version = "py38"
line-length = 88
extend-select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
Expand All @@ -69,15 +75,11 @@ extend-select = [
"TID", # flake8-tidy-imports
"UP", # pyupgrade
]
extend-exclude = [
"docs/*",
"tests/fixtures/exceptions/*"
]

[tool.ruff.flake8-tidy-imports]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"

[tool.ruff.isort]
[tool.ruff.lint.isort]
force-single-line = true
lines-between-types = 1
lines-after-imports = 2
Expand Down
4 changes: 1 addition & 3 deletions src/cleo/ui/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,9 +672,7 @@ def _get_cell_width(self, row: Row, column: int) -> int:
cell = row[column]
cell_width = len(self._io.remove_format(cell))

column_width = (
self._column_widths[column] if column in self._column_widths else 0
)
column_width = self._column_widths.get(column, 0)
cell_width = max(cell_width, column_width)

if column in self._column_max_widths:
Expand Down

0 comments on commit f22ddb0

Please sign in to comment.