Skip to content

Fix timestamp handling when paired with |gt |gte |lt and |lte - #375

Merged
thomaspatzke merged 3 commits into
SigmaHQ:mainfrom
Res260:fixtimestamps
Aug 6, 2025
Merged

Fix timestamp handling when paired with |gt |gte |lt and |lte#375
thomaspatzke merged 3 commits into
SigmaHQ:mainfrom
Res260:fixtimestamps

Conversation

@Res260

@Res260 Res260 commented Jul 30, 2025

Copy link
Copy Markdown
Contributor

Fix timestamp handling when paired with |gt |gte |lt and |lte modifiers.
Big oversight on my part, sorry!

@Res260

Res260 commented Jul 30, 2025

Copy link
Copy Markdown
Contributor Author

@thomaspatzke I'm not too sure what I did wrong about the typing. Help would be appreciated 🙏

@thomaspatzke

Copy link
Copy Markdown
Member

@thomaspatzke I'm not too sure what I did wrong about the typing. Help would be appreciated 🙏

I recently merged the large refactoring branch into main and since then mypy type checks are enforced. The findings are:

sigma/conversion/base.py:1814: error: Item "None" of "Optional[str]" has no attribute "format" [union-attr]

Your code expects that the object you call format() is a string but it might also be None. This should be checked before and raise a NotImplementedError if the template isn't set.

sigma/conversion/base.py:1816: error: Value of type "Optional[dict[TimestampPart, str]]" is not indexable [index]

Unsure but it could be that the reason here is also that a value is possibly None.

@Res260

Res260 commented Aug 5, 2025

Copy link
Copy Markdown
Contributor Author

Should be good now! Thanks

@thomaspatzke
thomaspatzke merged commit bb1e60c into SigmaHQ:main Aug 6, 2025
15 checks passed
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