Skip to content

Fix MyPy Type Issues - Complex Type Annotation Work #8

@timothyfroehlich

Description

@timothyfroehlich

Overview

Address complex MyPy type checking issues that require systematic type annotation work.

Issues to Address

1. Discord.py Cog Class Issues

  • Files: src/cogs/*.py
  • Issue: Unexpected keyword argument "name" for "__init_subclass__" of "object"
  • Complexity: Requires understanding Discord.py cog system and proper inheritance

2. Optional Type Annotations

  • Files: src/database.py, src/notifier.py, src/api.py
  • Issue: Incompatible default for argument with None defaults
  • Complexity: Requires systematic addition of Optional[] type hints

3. Base Class Type Issues

  • File: src/models.py
  • Issue: Variable "src.models.Base" is not valid as a type
  • Complexity: SQLAlchemy typing complexity

4. Import Redefinition Issues

  • Files: src/database.py, src/main.py
  • Issue: Name "Database" already defined (possibly by an import)
  • Complexity: Module structure refactoring needed

Acceptance Criteria

  • All MyPy errors resolved
  • Proper type hints added throughout codebase
  • Discord.py cog inheritance fixed
  • SQLAlchemy models properly typed
  • Import structure cleaned up

Created from linting infrastructure work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions