Skip to content

fix(orm): resolve basedpyright errors in migration and make commands - #238

Merged
tmgbedu merged 1 commit into
mainfrom
task/pyright-batch-14-masoniteorm
Sep 25, 2026
Merged

tmgbedu merged 1 commit into
mainfrom
task/pyright-batch-14-masoniteorm

Conversation

@tmgbedu

@tmgbedu tmgbedu commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Batch 14 of basedpyright fixes, scoped to masoniteorm/commands/ (no overlap with #237, #236, #170, #196, #220, #222).

Changes (10 files)

  • handle() in DBMigrate, DBSeed, MigrateFresh/Refresh/Reset/Rollback/Status, MakeMigration, MakeModel, MakeSeed now declares -> int and returns 0 explicitly (fixes reportIncompatibleMethodOverride against cleo's Command.handle() -> int).
  • resolve_migration_path() wraps use_base_path() (a Path) in str() to match its -> str annotation. Migrator already calls str()/os.path on it, so this changes nothing.

Behaviour

None. Cleo's BaseCommand.run already maps a None return to exit code 0, so returning 0 explicitly keeps every exit code the same. MakeSeedCommand used to return self.line(...) (which is None). It now calls self.line(...) and then return 0.

Verification

  • basedpyright: 159 → 143 errors, no new errors
  • pytest --ignore=tests/masoniteorm/postgres: 2411 passed, 7 skipped
  • ruff format/check clean

Not covered here: ShellCommand, MakeModelDocstringCommand (broken load_config import) and MakeObserverCommand.

🤖 Generated with Claude Code

handle() now declares -> int and returns 0 explicitly (cleo already mapped
None to 0), and resolve_migration_path() returns str as annotated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tmgbedu
tmgbedu merged commit afba8dc into main Sep 25, 2026
4 of 6 checks passed
@tmgbedu
tmgbedu deleted the task/pyright-batch-14-masoniteorm branch September 25, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant