Skip to content

Conversation

@uptickmetachu
Copy link
Collaborator

@uptickmetachu uptickmetachu commented Jan 21, 2026

Motivation

Improve code quality and developer experience by adding comprehensive type hints throughout the codebase and enabling strict mypy type checking. This helps catch type-related bugs at development time and makes the code more self-documenting.

Changes

  • Added type hints to all functions in gitops/ and gitops_server/ modules
  • Enabled strict mode in mypy configuration
  • Updated mypy to version 1.15
  • Added types-invoke package for invoke library type stubs
  • Fixed all mypy errors that arose from enabling strict mode

Files changed: 26 files across CLI and server components

Test Plan

  • Run uv run mypy gitops/ gitops_server/ and verify no errors
  • Run uv run pytest to ensure all tests still pass
  • Run uv run ruff check . to verify no linting issues
  • Test CLI commands work as expected (e.g., gitops summary)

@uptickmetachu uptickmetachu requested a review from Pwnion January 21, 2026 23:16
app = FastAPI()

@asynccontextmanager
async def lifespan(app: FastAPI) -> AsyncIterator[None]:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Wait a second this is... a feature hange claude.

Copy link

Choose a reason for hiding this comment

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

Wdym? Was adding this not intentional?

Pwnion
Pwnion previously approved these changes Jan 22, 2026
Copy link

@Pwnion Pwnion left a comment

Choose a reason for hiding this comment

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

Ran through the test plan, all looks good. Just some nitpicks.

app = FastAPI()

@asynccontextmanager
async def lifespan(app: FastAPI) -> AsyncIterator[None]:
Copy link

Choose a reason for hiding this comment

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

Wdym? Was adding this not intentional?

Copy link

@Pwnion Pwnion left a comment

Choose a reason for hiding this comment

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

Coooool

@uptickmetachu uptickmetachu merged commit b8fd6a0 into develop Jan 22, 2026
3 checks passed
@uptickmetachu uptickmetachu deleted the np-01/add-types branch January 22, 2026 03:07
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.

3 participants