mirror of
https://github.com/zvx-echo6/central.git
synced 2026-05-21 18:14:44 +02:00
chore: normalize line endings to LF
This commit is contained in:
parent
43088d7fbb
commit
374a8c067f
26 changed files with 5357 additions and 5346 deletions
19
.gitattributes
vendored
Normal file
19
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Normalize line endings to LF across the repo.
|
||||
# Prevents CRLF/LF churn in PR diffs.
|
||||
* text=auto eol=lf
|
||||
|
||||
# Explicit text types
|
||||
*.py text eol=lf
|
||||
*.sql text eol=lf
|
||||
*.md text eol=lf
|
||||
*.toml text eol=lf
|
||||
*.yaml text eol=lf
|
||||
*.yml text eol=lf
|
||||
*.json text eol=lf
|
||||
*.sh text eol=lf
|
||||
*.service text eol=lf
|
||||
|
||||
# Binary types
|
||||
*.pyc binary
|
||||
*.db binary
|
||||
*.key binary
|
||||
|
|
@ -38,7 +38,6 @@ def subject_for_event(ev: Event) -> str:
|
|||
|
||||
Dispatch by category prefix:
|
||||
- fire.*: returns central.<category> directly
|
||||
- quake.*: returns central.<category> directly
|
||||
- wx.*: uses weather alert subject logic
|
||||
|
||||
Weather alert subjects:
|
||||
|
|
@ -49,18 +48,11 @@ def subject_for_event(ev: Event) -> str:
|
|||
|
||||
Fire hotspot subjects:
|
||||
central.fire.hotspot.<satellite>.<confidence>
|
||||
|
||||
Quake event subjects:
|
||||
central.quake.event.<magnitude_tier>
|
||||
"""
|
||||
# Fire events: subject is just central.<category>
|
||||
if ev.category.startswith("fire."):
|
||||
return f"central.{ev.category}"
|
||||
|
||||
# Quake events: subject is just central.<category>
|
||||
if ev.category.startswith("quake."):
|
||||
return f"central.{ev.category}"
|
||||
|
||||
# Weather events: use geo-based subject logic
|
||||
prefix = "central.wx"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue