Skip to content

Chore linting with 120 line-length#324

Merged
Borda merged 7 commits intomasterfrom
lint/line-120
Jan 27, 2026
Merged

Chore linting with 120 line-length#324
Borda merged 7 commits intomasterfrom
lint/line-120

Conversation

@Borda
Copy link
Copy Markdown
Contributor

@Borda Borda commented Jan 27, 2026

This pull request updates linting and formatting configurations to improve code consistency and streamline tooling. The main changes involve switching formatting plugins, updating pre-commit hooks, and adjusting line length settings.

Pre-commit configuration updates:

  • Replaced the mdformat-black plugin with mdformat-ruff in the mdformat pre-commit hook to standardize markdown formatting using Ruff conventions.
  • Renamed the ruff pre-commit hook to ruff-check for clarity and consistency.

Formatting and linting settings:

  • Removed the [tool.black] section and its line-length setting from pyproject.toml, consolidating line length configuration under Ruff.
  • Increased the line-length setting for Ruff from 79 to 120 characters to allow for longer lines and improve readability.

@Borda Borda requested a review from shaypal5 as a code owner January 27, 2026 12:02
Copilot AI review requested due to automatic review settings January 27, 2026 12:02
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 98.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 98.41%. Comparing base (f57a518) to head (68dba44).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/cachier/cores/mongo.py 66.66% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #324   +/-   ##
=======================================
  Coverage   98.41%   98.41%           
=======================================
  Files          11       11           
  Lines        1010     1010           
  Branches      120      120           
=======================================
  Hits          994      994           
  Misses          9        9           
  Partials        7        7           
Flag Coverage Δ
local 73.76% <70.00%> (ø)
mongodb 45.84% <50.00%> (ø)
postgres 45.54% <46.00%> (ø)
redis 51.48% <50.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/cachier/config.py 100.00% <100.00%> (ø)
src/cachier/core.py 99.42% <100.00%> (ø)
src/cachier/cores/base.py 100.00% <100.00%> (ø)
src/cachier/cores/memory.py 100.00% <100.00%> (ø)
src/cachier/cores/pickle.py 99.16% <100.00%> (ø)
src/cachier/cores/redis.py 99.44% <100.00%> (ø)
src/cachier/cores/sql.py 92.66% <100.00%> (ø)
src/cachier/cores/mongo.py 94.28% <66.66%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f57a518...68dba44. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates linting/formatting configuration to standardize tooling around Ruff and allow a 120-character line length, along with reformatting affected code to match the new style.

Changes:

  • Move line-length configuration to Ruff and increase it to 120; remove Black configuration.
  • Update pre-commit hooks to use mdformat-ruff and rename the Ruff lint hook.
  • Apply formatting-only changes across src/, tests/, and examples/ to align with the updated formatting rules.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.pre-commit-config.yaml Switch mdformat plugin to mdformat-ruff and rename Ruff hook for clarity.
pyproject.toml Remove Black config and set Ruff line-length = 120.
src/cachier/core.py Formatting-only changes to function signatures and wrapped expressions.
src/cachier/config.py Formatting-only changes to helper function definitions and warning strings.
src/cachier/cores/base.py Formatting-only change to default-parameter update call.
src/cachier/cores/memory.py Formatting-only changes to method signatures and comprehensions.
src/cachier/cores/mongo.py Formatting-only changes to raised error formatting and query formatting.
src/cachier/cores/pickle.py Formatting-only changes to wrapped expressions and method signatures.
src/cachier/cores/redis.py Formatting-only changes to type annotations and warning strings.
src/cachier/cores/sql.py Formatting-only changes to table args, error strings, and wrapped expressions.
examples/redis_example.py Formatting-only changes to Redis client construction call.
tests/test_base_core.py Formatting-only changes to core construction calls.
tests/test_cleanup.py Formatting-only changes to string replacement chain.
tests/test_defaults.py Formatting-only changes to pytest.deprecated_call blocks.
tests/test_general.py Formatting-only change to pytest.param formatting.
tests/test_main.py Formatting-only changes to Click runner invocation formatting.
tests/test_memory_core.py Formatting-only changes to threading calls and hash helper formatting.
tests/test_mongo_core.py Formatting-only changes to strings, thread creation, and monkeypatch calls.
tests/test_pickle_core.py Formatting-only changes to helper calls, constants, and prints.
tests/test_redis_core.py Formatting-only changes to Redis client construction, debug prints, and decorators.
tests/test_redis_core_exceptions.py Formatting-only changes to fixtures, warnings contexts, and dict literals.
tests/test_sql_core.py Formatting-only change to pytest.raises usage formatting.

Comment thread tests/test_mongo_core.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants