Skip to content

Commit 655f639

Browse files
authored
chore: enable clang-format (#91)
1 parent 69c3943 commit 655f639

15 files changed

+936
-884
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,12 @@ repos:
7070
hooks:
7171
- id: bandit
7272
args: [-x, "tests,bench"]
73+
- repo: https://github.com/pre-commit/mirrors-clang-format
74+
rev: v19.1.7
75+
hooks:
76+
- id: clang-format
77+
types_or:
78+
- "c++"
79+
- "c"
80+
- "cuda"
81+
args: [-style=Webkit, -i]

bench/test_timestamp.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import pytest
2-
32
import tests.conftest # noqa
43

54
example = "01J3YPYJJW00GW0X476W5TVBFE"

bench/test_ulid_as_uuid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import pytest
21
from uuid import UUID
32

3+
import pytest
44
import tests.conftest # noqa
55

66

bench/test_ulid_parsing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import pytest
2-
32
import tests.conftest # noqa
43

54
example = "01J3MS6XG9XC7X9FR15J9A82ZP"

bench/test_ulid_strings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import pytest
2-
32
import tests.conftest # noqa
43

54

src/ulid_transform/_py_ulid_impl.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@
268268

269269

270270
def ulid_hex() -> str:
271-
"""Generate a ULID in lowercase hex that will work for a UUID.
271+
"""
272+
Generate a ULID in lowercase hex that will work for a UUID.
272273
273274
This ulid should not be used for cryptographically secure
274275
operations.
@@ -281,7 +282,8 @@ def ulid_hex() -> str:
281282

282283

283284
def ulid_at_time_bytes(timestamp: float) -> bytes:
284-
"""Generate an ULID as 16 bytes that will work for a UUID.
285+
"""
286+
Generate an ULID as 16 bytes that will work for a UUID.
285287
286288
uuid.UUID(bytes=ulid_bytes)
287289
"""
@@ -301,7 +303,8 @@ def ulid_now() -> str:
301303

302304

303305
def ulid_at_time(timestamp: float) -> str:
304-
"""Generate a ULID.
306+
"""
307+
Generate a ULID.
305308
306309
This ulid should not be used for cryptographically secure
307310
operations.

0 commit comments

Comments
 (0)