Repository navigation
Refactor templates and update linting configurations - #130
Conversation
- Adjusted indentation and formatting in various Jinja2 template files to enhance clarity. - Updated the `pyproject.toml` to simplify development dependencies. - Introduced a new `ruff.toml` configuration file for linting settings. - Cleaned up test files by removing unnecessary comments and improving code style. - Added a README for translations to guide users on managing locale catalogs.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| CodeStyle | 10 minor |
🟢 Metrics 0 complexity · 0 duplication
Metric Results Complexity 0 Duplication 0
🟢 Coverage 100.00% diff coverage · +0.00% coverage variation
Metric Results Coverage variation ✅ +0.00% coverage variation (-1.00%) Diff coverage ✅ 100.00% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (d9a641d) 1848 1747 94.53% Head commit (fbf5bba) 1848 (+0) 1747 (+0) 94.53% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#130) 16 16 100.00% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Pull Request
This pull request introduces a standardized, modernized linting and formatting setup across the codebase, replacing legacy tools (Black, Flake8) with a unified pre-commit-based workflow using Ruff, isort, djLint, Prettier, and additional quality checks. It updates configuration files, documentation, and CI workflows to reflect these changes, and removes obsolete configs and scripts. Minor code cleanups and formatting tweaks are also included.
Tooling and Linting Modernization:
.pre-commit-config.yamlto define a consistent set of pre-commit hooks (Ruff, isort, djLint, Prettier, codespell, ShellCheck, lessc) for code quality and formatting checks across Python, templates, JS, LESS, JSON, and YAML..flake8andeslint.config.js, and removed references to Black and Flake8 in documentation and configs. [1] [2] [3] [4] [5] [6].isort.cfg(isort),.djlintrc(djLint),.prettierrc.yamland.prettierignore(Prettier), with shared settings for all plugin repos. [1] [2] [3] [4]CI and Workflow Updates:
.github/workflows/ci.ymlto use pre-commit for linting in CI, removed node and ShellCheck setup steps, and adjusted caching and environment variables for the new workflow. [1] [2] [3]Documentation Updates:
README.md,CONTRIBUTING.md, and docs to reference Ruff and the new pre-commit-based workflow, removing mentions of Black and Flake8 and describing the new process for running checks and formatting code. [1] [2] [3] [4] [5] [6]Codebase Cleanups and Formatting:
octoprint_temp_eta/__init__.py(e.g., single-line assignments, improved logger calls, removed flake8 comments). [1] [2] [3] [4] [5] [6] [7]Other Configuration Updates:
.editorconfigand.codacy.ymlto match new standards (e.g., line length, exclude paths). [1] [2]These changes collectively ensure a more maintainable, consistent, and automated code quality process across the project.
Checklist
pytest)pre-commit run --all-files)permissions:and avoidpull_request_targetunless strictly necessary