Merge pull request #111 from mixelpixx/chore/normalize-line-endings

chore: enforce LF line endings and normalize the tree
This commit is contained in:
Eugene Mikhantyev
2026-04-18 15:34:45 +01:00
committed by GitHub
54 changed files with 18375 additions and 18299 deletions

21
.editorconfig Normal file
View File

@@ -0,0 +1,21 @@
root = true
[*]
end_of_line = lf
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
[*.{ts,tsx,js,jsx,mjs,cjs,json,yml,yaml,md,html,css}]
indent_size = 2
[*.md]
trim_trailing_whitespace = false
[*.{bat,cmd,ps1}]
end_of_line = crlf
[Makefile]
indent_style = tab

51
.gitattributes vendored Normal file
View File

@@ -0,0 +1,51 @@
# Normalize all text files to LF on commit and checkout.
# Prevents CRLF drift when contributors work on Windows with core.autocrlf=true.
* text=auto eol=lf
# Python and shell — LF everywhere, shebangs require it on Unix.
*.py text eol=lf
*.sh text eol=lf
# Web / config — LF.
*.ts text eol=lf
*.tsx text eol=lf
*.js text eol=lf
*.jsx text eol=lf
*.mjs text eol=lf
*.cjs text eol=lf
*.json text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.toml text eol=lf
*.md text eol=lf
*.html text eol=lf
*.css text eol=lf
# KiCad project files are text (S-expressions / JSON) — LF.
*.kicad_sch text eol=lf
*.kicad_pcb text eol=lf
*.kicad_pro text eol=lf
*.kicad_sym text eol=lf
*.kicad_mod text eol=lf
*.kicad_dru text eol=lf
*.kicad_wks text eol=lf
*.net text eol=lf
# Windows-native scripts — must stay CRLF.
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
# Binary assets — never touch.
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.pdf binary
*.zip binary
*.gz binary
*.woff binary
*.woff2 binary
*.ttf binary
*.otf binary

View File

@@ -4,6 +4,8 @@ repos:
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
args: ["--fix=lf"]
- id: check-yaml
- id: check-json
- id: check-added-large-files

View File

@@ -13,7 +13,9 @@ class SchematicManager:
"""Core schematic operations using kicad-skip"""
@staticmethod
def create_schematic(name: str, metadata: Optional[Any] = None, *, path: Optional[str] = None) -> Any:
def create_schematic(
name: str, metadata: Optional[Any] = None, *, path: Optional[str] = None
) -> Any:
"""Create a new empty schematic from template"""
try:
# Determine template path (use template_with_symbols for component cloning support)