mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-09 15:08:02 -05:00
update editorconfig, enforce via CI (#1343)
* update editorconfig to set unix-style newlines and trim whitespace * add editorconfig github action to the CI * fix whitespace
This commit is contained in:
@@ -1,4 +1,16 @@
|
||||
# 2 space indentation
|
||||
# Top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file, utf-8 charset
|
||||
[*]
|
||||
end_of_line = lf
|
||||
trim_trailing_whitespace = true
|
||||
charset = utf-8
|
||||
|
||||
[*.py]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# ignore binary files
|
||||
[{*.hwx,*.mlmodel,*.weights,*.golden}]
|
||||
end_of_line = unset
|
||||
trim_trailing_whitespace = unset
|
||||
|
||||
13
.github/workflows/editorconfig.yml
vendored
Normal file
13
.github/workflows/editorconfig.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
name: EditorConfig Checker
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
editorconfig:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: editorconfig-checker/action-editorconfig-checker@main
|
||||
- run: editorconfig-checker
|
||||
@@ -69,6 +69,5 @@ int main(int argc, char* argv[]) {
|
||||
int ret = ANECCompile(optionsDictionary, flagsDictionary, 0);
|
||||
printf("compile: %d\n", ret);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
1
test/external/external_test_yolov8.py
vendored
1
test/external/external_test_yolov8.py
vendored
@@ -74,4 +74,3 @@ class TestYOLOv8(unittest.TestCase):
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
@@ -102,5 +102,6 @@ class TestUtils(unittest.TestCase):
|
||||
assert a.shape == b.shape
|
||||
assert a.dtype == b.dtype
|
||||
assert np.array_equal(a, b)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user