Skip to content

Conversation

@pfouque
Copy link
Member

@pfouque pfouque commented Nov 21, 2023

Closes #12

  • Setup mypy config
  • Add typing to core library
  • Add typing to tests
  • Add typing to graph_transitions command

@pfouque pfouque self-assigned this Nov 21, 2023
@pfouque pfouque force-pushed the mypy_level_1 branch 6 times, most recently from c7fcdc0 to 0b001e6 Compare November 22, 2023 05:33
@pfouque pfouque force-pushed the mypy_level_1 branch 2 times, most recently from 90c05e1 to 9194723 Compare November 30, 2023 04:33
@pfouque pfouque force-pushed the main branch 5 times, most recently from ca653bf to 4e3ac13 Compare December 25, 2023 07:35
@pfouque pfouque force-pushed the mypy_level_1 branch 4 times, most recently from 8e77aac to 4251f54 Compare May 1, 2024 12:53
@cclauss
Copy link
Contributor

cclauss commented Oct 8, 2025

Please rebase.

This branch has conflicts that must be resolved

@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

❌ Patch coverage is 97.65625% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
django_fsm/__init__.py 96.80% 3 Missing ⚠️
Files with missing lines Coverage Δ
...jango_fsm/management/commands/graph_transitions.py 100.00% <100.00%> (+1.75%) ⬆️
django_fsm/signals.py 100.00% <100.00%> (ø)
django_fsm/__init__.py 94.94% <96.80%> (+0.08%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pfouque pfouque force-pushed the mypy_level_1 branch 4 times, most recently from 3fd9cab to cebd6e9 Compare January 15, 2026 05:53
self.model.publish()
assert self.model.state == "published"
transitions = self.model.get_available_state_transitions()
transitions = self.model.get_available_state_transitions() # type: ignore[attr-defined]
Copy link
Member Author

Choose a reason for hiding this comment

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

would be nice to find a way to add typing dynamically...

class DeferrableModel(models.Model):
state = FSMField(default="new")

objects: ClassVar[models.Manager[DeferrableModel]] = models.Manager()
Copy link
Member Author

Choose a reason for hiding this comment

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

I noticed models declared in tests doesn't benefit from django stubs magic ... :(

@pfouque pfouque force-pushed the mypy_level_1 branch 3 times, most recently from c5561fe to 532d6ee Compare January 21, 2026 07:32
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.

Add Typing

3 participants