Skip to content

Conversation

@shawnyu5
Copy link

Attempt to standardise state management by refactor state management into its own module, and add type hints for the state table. This makes it easier to add additional fields to the state later on.

Also fixed a few places where the user config is not being respected.

@shawnyu5 shawnyu5 marked this pull request as ready for review August 13, 2025 17:21
M = {
initialized = false,
last_scan_time = 0,
config = {
Copy link
Owner

Choose a reason for hiding this comment

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

can we have the default config isolted somewhere so it is easy to link this from the readme

Copy link
Author

Choose a reason for hiding this comment

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

Moved the default config into its own variable in the file.

Copy link
Owner

@dmtrKovalenko dmtrKovalenko left a comment

Choose a reason for hiding this comment

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

Thanks for doing this. This is huge, I was always delaying writing the type defs for all the state and configuration

@shawnyu5 shawnyu5 force-pushed the refactor/state_management branch from 5689ef1 to 7e4ac6a Compare August 14, 2025 01:08
@shawnyu5
Copy link
Author

Merged main into this branch. Fixed conflicts.

@shawnyu5 shawnyu5 requested a review from dmtrKovalenko August 14, 2025 01:13
@dmtrKovalenko dmtrKovalenko requested a review from sQVe August 27, 2025 16:44
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.

2 participants