Conversation
📝 WalkthroughWalkthroughReplaces CLI’s inline migration-file scaffolding with a NewMigrationUseCase that delegates creation to FileMigrationManager.new_migration; adds CreateMigrationError and NewMigrationError, MigrationFile validation and factory methods, and new CLI options Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
🧰 Additional context used📓 Path-based instructions (2)**/*.py📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
⚙️ CodeRabbit configuration file
Files:
**/*⚙️ CodeRabbit configuration file
Files:
🧠 Learnings (2)📚 Learning: 2026-01-15T13:30:45.197ZApplied to files:
📚 Learning: 2026-01-15T13:54:01.365ZApplied to files:
🧬 Code graph analysis (3)mpt_tool/cli.py (4)
mpt_tool/use_cases/new_migration.py (4)
mpt_tool/models.py (1)
🪛 Ruff (0.14.11)mpt_tool/cli.py20-20: Unused Remove unused (RUF100) mpt_tool/models.py73-75: Avoid specifying long messages outside the exception class (TRY003) mpt_tool/managers.py27-27: Unused Remove unused (RUF100) 30-30: Avoid specifying long messages outside the exception class (TRY003) 81-81: Avoid specifying long messages outside the exception class (TRY003) 86-88: Avoid specifying long messages outside the exception class (TRY003) 🔇 Additional comments (11)
✏️ Tip: You can disable this entire section by setting Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@mpt_tool/models.py`:
- Around line 71-75: In __post_init__, update the ValueError message raised for
migration_id validation to correct the grammar from "must contains only
alphanumeric letters and numbers, or underscores." to "must contain only
alphanumeric characters or underscores." — edit the error string in the
migration_id validation within the __post_init__ method.
🧹 Nitpick comments (2)
mpt_tool/use_cases/new_migration.py (1)
9-10: Consider consistency with RunMigrationsUseCase constructor pattern.This constructor instantiates
FileMigrationManager()when no manager is provided, whileRunMigrationsUseCasestores the class reference (FileMigrationManager) without instantiation. SinceFileMigrationManageruses only@classmethodmethods, both approaches work, but the inconsistency may cause confusion.Option to align with RunMigrationsUseCase pattern
def __init__(self, file_manager: FileMigrationManager | None = None): - self.file_manager = file_manager or FileMigrationManager() + self.file_manager = file_manager or FileMigrationManagerAlternatively, consider refactoring both use cases to use a consistent pattern (either both use class references or both use instances).
mpt_tool/cli.py (1)
65-69: Useraise typer.Abort from Noneto suppress exception chaining.Since Typer only prints "Aborted!" on
typer.Abort, the user-facing error message is already communicated viatyper.secho. Usingfrom Nonesuppresses the exception chain and keeps the output clean.Based on learnings, this pattern should be applied here. The same applies to line 56 for consistency.
♻️ Proposed fix
try: filename = NewMigrationUseCase().execute(migration_type, cast(str, filename_suffix)) except NewMigrationError as error: typer.secho(f"Error creating migration: {error!s}", fg=typer.colors.RED) - raise typer.Abort + raise typer.Abort from NoneFor consistency, also consider updating line 56:
except RunMigrationError as error: typer.secho(f"Error running migrations: {error!s}", fg=typer.colors.RED) - raise typer.Abort + raise typer.Abort from None
📜 Review details
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
mpt_tool/cli.pympt_tool/errors.pympt_tool/managers.pympt_tool/models.pympt_tool/use_cases/new_migration.pympt_tool/use_cases/run_migrations.py
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.py: All configuration must be provided via environment variables; do not hardcode configuration values
Use type annotations (PEP 484) in Python files, except in thetests/folder
All public functions, methods, and classes must include Google-style docstrings
Do not add inline comments; rely on clear code and docstrings instead
Function and variable names must be explicit and intention-revealing
Follow PEP 8 unless explicitly overridden by ruff
Files:
mpt_tool/use_cases/run_migrations.pympt_tool/use_cases/new_migration.pympt_tool/models.pympt_tool/managers.pympt_tool/errors.pympt_tool/cli.py
⚙️ CodeRabbit configuration file
**/*.py: Follow the linting rules defined in pyproject.toml under [tool.ruff] and [tool.flake8] sections.
For formatting, use Ruff instead of Black. Do not suggest Black formatting changes.
Files:
mpt_tool/use_cases/run_migrations.pympt_tool/use_cases/new_migration.pympt_tool/models.pympt_tool/managers.pympt_tool/errors.pympt_tool/cli.py
**/*
⚙️ CodeRabbit configuration file
**/*: For each subsequent commit in this PR, explicitly verify if previous review comments have been resolved
Files:
mpt_tool/use_cases/run_migrations.pympt_tool/use_cases/new_migration.pympt_tool/models.pympt_tool/managers.pympt_tool/errors.pympt_tool/cli.py
🧠 Learnings (4)
📚 Learning: 2026-01-09T16:49:46.680Z
Learnt from: svazquezco
Repo: softwareone-platform/mpt-tool PR: 10
File: tests/commands/test_base.py:19-24
Timestamp: 2026-01-09T16:49:46.680Z
Learning: In tests accessing protected attributes like `_type` from command classes, use `# noqa: WPS437` to suppress wemake-python-styleguide's protected attribute usage violation. Ruff may flag this as unused (RUF100) because it doesn't recognize wemake rules, but the noqa comment must be kept for flake8/wemake compliance.
Applied to files:
mpt_tool/use_cases/run_migrations.py
📚 Learning: 2026-01-15T13:54:01.365Z
Learnt from: svazquezco
Repo: softwareone-platform/mpt-tool PR: 15
File: mpt_tool/cli.py:57-59
Timestamp: 2026-01-15T13:54:01.365Z
Learning: When reviewing Ruff lint violations, first check the project's pyproject.toml under [tool.ruff.lint].ignore to see which rules are explicitly ignored. Do not report violations for rules listed in that ignore list. Apply this guidance across all repositories in the softwareone-platform organization that use the same Ruff configuration.
Applied to files:
mpt_tool/use_cases/run_migrations.pympt_tool/use_cases/new_migration.pympt_tool/models.pympt_tool/managers.pympt_tool/errors.pympt_tool/cli.py
📚 Learning: 2026-01-15T15:01:25.807Z
Learnt from: svazquezco
Repo: softwareone-platform/mpt-tool PR: 15
File: mpt_tool/use_cases/run_migrations.py:58-70
Timestamp: 2026-01-15T15:01:25.807Z
Learning: In mpt_tool/use_cases/run_migrations.py, do not persist a 'started' state before running a migration. If the process crashes or is terminated during migration execution, the migration should be re-attempted from scratch on the next run instead of being treated as started. This ensures crash-recovery and idempotent migrations. Consider adding tests to verify that a partially-run migration does not get stuck and that subsequent runs re-attempt from the beginning. If broader applicability is intended, this behavior should be generalized to the entire migration runner logic.
Applied to files:
mpt_tool/use_cases/run_migrations.py
📚 Learning: 2026-01-15T13:30:45.197Z
Learnt from: svazquezco
Repo: softwareone-platform/mpt-tool PR: 15
File: mpt_tool/cli.py:57-59
Timestamp: 2026-01-15T13:30:45.197Z
Learning: In except blocks that raise typer.Abort, raise typer.Abort from None to suppress exception chaining (B904). Since Typer only prints 'Aborted!' and exits, ensure user-facing communication is done before raising Abort (e.g., via typer.secho) and apply this pattern in mpt_tool/cli.py to keep user messages clear.
Applied to files:
mpt_tool/cli.py
🧬 Code graph analysis (4)
mpt_tool/use_cases/run_migrations.py (2)
mpt_tool/use_cases/new_migration.py (1)
execute(12-21)mpt_tool/enums.py (1)
MigrationTypeEnum(4-13)
mpt_tool/use_cases/new_migration.py (4)
mpt_tool/enums.py (1)
MigrationTypeEnum(4-13)mpt_tool/errors.py (2)
CreateMigrationError(12-13)NewMigrationError(20-21)mpt_tool/managers.py (1)
new_migration(73-96)mpt_tool/models.py (1)
file_name(67-69)
mpt_tool/managers.py (3)
mpt_tool/errors.py (1)
CreateMigrationError(12-13)mpt_tool/models.py (4)
Migration(10-55)MigrationFile(59-102)new(93-102)file_name(67-69)mpt_tool/enums.py (1)
MigrationTypeEnum(4-13)
mpt_tool/cli.py (4)
mpt_tool/enums.py (1)
MigrationTypeEnum(4-13)mpt_tool/use_cases/run_migrations.py (2)
RunMigrationsUseCase(16-80)execute(27-70)mpt_tool/managers.py (1)
new_migration(73-96)mpt_tool/use_cases/new_migration.py (2)
NewMigrationUseCase(6-21)execute(12-21)
🪛 Ruff (0.14.11)
mpt_tool/use_cases/run_migrations.py
27-27: Unused noqa directive (non-enabled: C901; unknown: WPS231)
Remove unused noqa directive
(RUF100)
mpt_tool/models.py
73-75: Avoid specifying long messages outside the exception class
(TRY003)
mpt_tool/managers.py
79-79: Avoid specifying long messages outside the exception class
(TRY003)
84-86: Avoid specifying long messages outside the exception class
(TRY003)
mpt_tool/cli.py
20-20: Unused noqa directive (non-enabled: C901; unknown: WPS238, WPS231)
Remove unused noqa directive
(RUF100)
🔇 Additional comments (9)
mpt_tool/use_cases/run_migrations.py (1)
27-27: LGTM - noqa directive is appropriate for wemake-python-styleguide compliance.The static analysis hint about unused
noqais a false positive. Based on learnings, Ruff doesn't recognize WPS rules from wemake-python-styleguide, but thesenoqacomments must be retained for flake8/wemake compliance. The removal ofWPS213while keepingC901andWPS231appears intentional.mpt_tool/models.py (2)
66-69: LGTM!The
file_nameproperty correctly formats the migration filename with the.pyextension, complementing the existingnameproperty used for module identification.
92-102: LGTM!The
newclassmethod properly generates timestamp-based order IDs using UTC time, ensuring consistent ordering across different timezones. The validation ofmigration_idwill be handled by__post_init__when the instance is created.mpt_tool/errors.py (1)
12-22: LGTM!The new error classes follow the established pattern and provide clear separation:
CreateMigrationErrorfor low-level file creation failures in the managerNewMigrationErrorfor use-case level errors exposed to CLImpt_tool/managers.py (1)
11-18: LGTM!Import additions are clean and properly organized, bringing in the new error type and template for migration scaffolding.
mpt_tool/use_cases/new_migration.py (1)
12-21: LGTM!The
executemethod properly:
- Delegates to
FileMigrationManager.new_migration()- Maps internal
CreateMigrationErrorto user-facingNewMigrationError- Returns the generated filename for CLI feedback
mpt_tool/cli.py (3)
1-9: LGTM!The imports are correctly structured and all added imports (
cast,NewMigrationError,NewMigrationUseCase) are used in the code.
20-20: Static analysis false positive - noqa directive is valid for flake8.The RUF100 hint flags
WPS238andWPS231as unknown rules, but these are wemake-python-styleguide rules for flake8, not Ruff. Since the project uses both Ruff and flake8 (per pyproject.toml), the noqa directive is correctly placed for flake8 linting.
41-59: Options validation and migration execution logic look correct.The mutual exclusivity check and at-least-one-option enforcement are properly implemented.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
37b53ac to
8fee1a9
Compare
84bf46c to
bab4930
Compare
8fee1a9 to
20e3918
Compare
7cc9a10 to
bc879bc
Compare
20e3918 to
4f001ff
Compare
4f001ff to
fbf9eb9
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@mpt_tool/cli.py`:
- Around line 65-69: The exception handlers for RunMigrationError and
NewMigrationError currently re-raise typer.Abort and thereby allow exception
chaining; update both handlers (the except blocks that catch RunMigrationError
around the run migration flow and the except block that catches
NewMigrationError around NewMigrationUseCase().execute) to use "raise
typer.Abort from None" to suppress exception chaining in CLI output.
♻️ Duplicate comments (2)
mpt_tool/models.py (1)
71-75: Validation message looks corrected.Thanks for tightening the wording here.
mpt_tool/managers.py (1)
72-96: Line-length concern resolved; creation flow reads well.The method is clear and the signature fits within the limit now.
📜 Review details
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
mpt_tool/cli.pympt_tool/errors.pympt_tool/managers.pympt_tool/models.pympt_tool/use_cases/new_migration.py
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.py: All configuration must be provided via environment variables; do not hardcode configuration values
Use type annotations (PEP 484) in Python files, except in thetests/folder
All public functions, methods, and classes must include Google-style docstrings
Do not add inline comments; rely on clear code and docstrings instead
Function and variable names must be explicit and intention-revealing
Follow PEP 8 unless explicitly overridden by ruff
Files:
mpt_tool/errors.pympt_tool/use_cases/new_migration.pympt_tool/models.pympt_tool/cli.pympt_tool/managers.py
⚙️ CodeRabbit configuration file
**/*.py: Follow the linting rules defined in pyproject.toml under [tool.ruff] and [tool.flake8] sections.
For formatting, use Ruff instead of Black. Do not suggest Black formatting changes.
Files:
mpt_tool/errors.pympt_tool/use_cases/new_migration.pympt_tool/models.pympt_tool/cli.pympt_tool/managers.py
**/*
⚙️ CodeRabbit configuration file
**/*: For each subsequent commit in this PR, explicitly verify if previous review comments have been resolved
Files:
mpt_tool/errors.pympt_tool/use_cases/new_migration.pympt_tool/models.pympt_tool/cli.pympt_tool/managers.py
🧠 Learnings (2)
📚 Learning: 2026-01-15T13:54:01.365Z
Learnt from: svazquezco
Repo: softwareone-platform/mpt-tool PR: 15
File: mpt_tool/cli.py:57-59
Timestamp: 2026-01-15T13:54:01.365Z
Learning: When reviewing Ruff lint violations, first check the project's pyproject.toml under [tool.ruff.lint].ignore to see which rules are explicitly ignored. Do not report violations for rules listed in that ignore list. Apply this guidance across all repositories in the softwareone-platform organization that use the same Ruff configuration.
Applied to files:
mpt_tool/errors.pympt_tool/use_cases/new_migration.pympt_tool/models.pympt_tool/cli.pympt_tool/managers.py
📚 Learning: 2026-01-15T13:30:45.197Z
Learnt from: svazquezco
Repo: softwareone-platform/mpt-tool PR: 15
File: mpt_tool/cli.py:57-59
Timestamp: 2026-01-15T13:30:45.197Z
Learning: In except blocks that raise typer.Abort, raise typer.Abort from None to suppress exception chaining (B904). Since Typer only prints 'Aborted!' and exits, ensure user-facing communication is done before raising Abort (e.g., via typer.secho) and apply this pattern in mpt_tool/cli.py to keep user messages clear.
Applied to files:
mpt_tool/cli.py
🧬 Code graph analysis (4)
mpt_tool/use_cases/new_migration.py (4)
mpt_tool/enums.py (1)
MigrationTypeEnum(4-13)mpt_tool/errors.py (2)
CreateMigrationError(12-13)NewMigrationError(20-21)mpt_tool/managers.py (2)
FileMigrationManager(21-96)new_migration(73-96)mpt_tool/models.py (1)
file_name(67-69)
mpt_tool/models.py (1)
mpt_tool/managers.py (1)
new(136-146)
mpt_tool/cli.py (5)
mpt_tool/enums.py (1)
MigrationTypeEnum(4-13)mpt_tool/errors.py (2)
NewMigrationError(20-21)RunMigrationError(28-29)mpt_tool/use_cases/run_migrations.py (2)
RunMigrationsUseCase(16-84)execute(27-74)mpt_tool/managers.py (1)
new_migration(73-96)mpt_tool/use_cases/new_migration.py (2)
NewMigrationUseCase(6-21)execute(12-21)
mpt_tool/managers.py (3)
mpt_tool/errors.py (4)
CreateMigrationError(12-13)LoadMigrationError(16-17)MigrationFolderError(24-25)StateNotFoundError(32-33)mpt_tool/models.py (4)
Migration(10-55)MigrationFile(59-102)new(93-102)file_name(67-69)mpt_tool/enums.py (1)
MigrationTypeEnum(4-13)
🪛 Ruff (0.14.11)
mpt_tool/models.py
73-75: Avoid specifying long messages outside the exception class
(TRY003)
mpt_tool/cli.py
20-20: Unused noqa directive (non-enabled: C901; unknown: WPS238, WPS231)
Remove unused noqa directive
(RUF100)
mpt_tool/managers.py
79-79: Avoid specifying long messages outside the exception class
(TRY003)
84-86: Avoid specifying long messages outside the exception class
(TRY003)
🔇 Additional comments (8)
mpt_tool/models.py (3)
66-69:file_nameproperty is clear and consistent.Nice centralization of the
.pynaming convention.
93-102: Factory method fits the new flow.The timestamp-based name and returned instance line up well with the new scaffolding path.
71-75: No existing migration files found—validation concern is not applicable.The repository contains no migration files to validate. The
migrations/directory does not exist, and no migration files are present anywhere in the codebase. All test fixtures use valid Python identifiers (fake_data_file_name,fake_error_file_name,fake_schema_file_name), which comply with theisidentifier()check. The validation is appropriate and necessary to prevent invalid identifiers (those containing hyphens or starting with digits) in future migration files.mpt_tool/errors.py (1)
12-21: New error types improve boundary clarity.These specialized exceptions make the migration scaffolding flow easier to reason about.
mpt_tool/managers.py (1)
11-18: Imports align with the new scaffolding flow.Looks good and keeps dependencies explicit.
mpt_tool/use_cases/new_migration.py (1)
6-21: Use-case wrapper is straightforward.The delegation and error translation are clean and consistent with the manager API.
mpt_tool/cli.py (2)
2-9: Imports updated cleanly for the new use case.No issues here.
20-39: Option wiring looks good.The new flags and exclusivity checks are clear and user-friendly.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@mpt_tool/cli.py`:
- Around line 63-69: The exception chain should be suppressed when aborting
after reporting the error: replace the plain raises of typer.Abort with "raise
typer.Abort from None" in both places where NewMigrationError is caught (the
except blocks that call typer.secho for the error message around the
NewMigrationUseCase().execute(...) call and the earlier similar block handling
filename_suffix), so that after logging the error you raise typer.Abort from
None to prevent exception chaining.
In `@mpt_tool/managers.py`:
- Around line 88-95: Wrap the call to migration_file.full_path.write_text(...)
in a try/except that catches OSError (and optionally IOError) and raises
CreateMigrationError with a clear message and the original exception chained
(raise CreateMigrationError(...) from e); update the block that builds the
scaffolding using MIGRATION_SCAFFOLDING_TEMPLATE and MigrationTypeEnum so that
any filesystem failures when writing the migration file for migration_file are
converted into CreateMigrationError instead of leaking an OSError.
In `@mpt_tool/models.py`:
- Around line 71-75: The new __post_init__ on MigrationFile can raise ValueError
when build_from_path parses legacy filenames; update
FileMigrationManager.validate() to catch ValueError coming from constructing
MigrationFile instances (or from MigrationFile.build_from_path) and re-raise a
MigrationFolderError that includes the offending filename (preserve the original
exception as __cause__), so RunMigrationsUseCase receives a MigrationFolderError
instead of an uncaught ValueError; reference the methods __post_init__,
build_from_path, FileMigrationManager.validate(), MigrationFolderError and
RunMigrationsUseCase when making the change.
📜 Review details
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
mpt_tool/cli.pympt_tool/errors.pympt_tool/managers.pympt_tool/models.pympt_tool/use_cases/new_migration.py
🚧 Files skipped from review as they are similar to previous changes (2)
- mpt_tool/errors.py
- mpt_tool/use_cases/new_migration.py
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.py: All configuration must be provided via environment variables; do not hardcode configuration values
Use type annotations (PEP 484) in Python files, except in thetests/folder
All public functions, methods, and classes must include Google-style docstrings
Do not add inline comments; rely on clear code and docstrings instead
Function and variable names must be explicit and intention-revealing
Follow PEP 8 unless explicitly overridden by ruff
Files:
mpt_tool/managers.pympt_tool/cli.pympt_tool/models.py
⚙️ CodeRabbit configuration file
**/*.py: Follow the linting rules defined in pyproject.toml under [tool.ruff] and [tool.flake8] sections.
For formatting, use Ruff instead of Black. Do not suggest Black formatting changes.
Files:
mpt_tool/managers.pympt_tool/cli.pympt_tool/models.py
**/*
⚙️ CodeRabbit configuration file
**/*: For each subsequent commit in this PR, explicitly verify if previous review comments have been resolved
Files:
mpt_tool/managers.pympt_tool/cli.pympt_tool/models.py
🧠 Learnings (2)
📚 Learning: 2026-01-15T13:54:01.365Z
Learnt from: svazquezco
Repo: softwareone-platform/mpt-tool PR: 15
File: mpt_tool/cli.py:57-59
Timestamp: 2026-01-15T13:54:01.365Z
Learning: When reviewing Ruff lint violations, first check the project's pyproject.toml under [tool.ruff.lint].ignore to see which rules are explicitly ignored. Do not report violations for rules listed in that ignore list. Apply this guidance across all repositories in the softwareone-platform organization that use the same Ruff configuration.
Applied to files:
mpt_tool/managers.pympt_tool/cli.pympt_tool/models.py
📚 Learning: 2026-01-15T13:30:45.197Z
Learnt from: svazquezco
Repo: softwareone-platform/mpt-tool PR: 15
File: mpt_tool/cli.py:57-59
Timestamp: 2026-01-15T13:30:45.197Z
Learning: In except blocks that raise typer.Abort, raise typer.Abort from None to suppress exception chaining (B904). Since Typer only prints 'Aborted!' and exits, ensure user-facing communication is done before raising Abort (e.g., via typer.secho) and apply this pattern in mpt_tool/cli.py to keep user messages clear.
Applied to files:
mpt_tool/cli.py
🧬 Code graph analysis (2)
mpt_tool/cli.py (5)
mpt_tool/enums.py (1)
MigrationTypeEnum(4-13)mpt_tool/errors.py (2)
NewMigrationError(20-21)RunMigrationError(28-29)mpt_tool/use_cases/run_migrations.py (2)
RunMigrationsUseCase(16-84)execute(27-74)mpt_tool/managers.py (1)
new_migration(73-96)mpt_tool/use_cases/new_migration.py (2)
NewMigrationUseCase(6-21)execute(12-21)
mpt_tool/models.py (1)
mpt_tool/managers.py (1)
new(136-146)
🪛 Ruff (0.14.11)
mpt_tool/managers.py
79-79: Avoid specifying long messages outside the exception class
(TRY003)
84-86: Avoid specifying long messages outside the exception class
(TRY003)
mpt_tool/cli.py
20-20: Unused noqa directive (non-enabled: C901; unknown: WPS238, WPS231)
Remove unused noqa directive
(RUF100)
mpt_tool/models.py
73-75: Avoid specifying long messages outside the exception class
(TRY003)
🔇 Additional comments (4)
mpt_tool/models.py (2)
66-70:file_nameproperty is a clean addition.
Centralizes the.pysuffix and avoids duplication.
93-102: Factory method looks good.
UTC timestamp +order_idalignment is clear and consistent with naming.mpt_tool/managers.py (1)
72-74: Signature looks good; prior line-length concern resolved.
Line 73 is within the configured limit now.mpt_tool/cli.py (1)
20-20: Keep thenoqacomment for flake8/wemake compliance.The noqa directive contains
WPS238andWPS231, which are flake8/wemake-python-styleguide rules. While Ruff will flag this as an unused noqa (RUF100), the directive must be retained because flake8 uses it for wemake rule suppression. Ruff does not recognize wemake rules, so it incorrectly marks them as unused—but they are necessary for linting compliance across both tools.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
fbf9eb9 to
f94281a
Compare
f94281a to
da214a3
Compare
|



Closes MPT-16844