Skip to content

Commit

Permalink
pre-commit autoupdate
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Clauss <[email protected]>
  • Loading branch information
cclauss committed Nov 24, 2023
1 parent c4b35f3 commit 3eb1f9a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 21 deletions.
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exclude: "^(src/memray/reporters/templates/assets|src/vendor|benchmarks|docs/_static/flamegraphs)/"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-json
Expand All @@ -20,13 +20,13 @@ repos:
- id: rst-inline-touching-normal

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.262"
rev: "v0.1.6"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.11.0
hooks:
- id: black

Expand All @@ -37,28 +37,28 @@ repos:
exclude_types: [python]

- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v0.6.7
rev: v0.9.0
hooks:
- id: sphinx-lint

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
rev: v3.1.0
hooks:
- id: prettier
args: [--no-editorconfig]
exclude: "^asv\\.conf\\.json$"
exclude_types: [html]

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.2
rev: v17.0.5
hooks:
- id: clang-format
args: [--Werror, -i]
exclude: "^tests/integration/"
types_or: [c++, c, cuda]

- repo: https://github.com/rstcheck/rstcheck
rev: v6.1.2
rev: v6.2.0
hooks:
- id: rstcheck
files: ^news/
Expand Down
4 changes: 3 additions & 1 deletion docs/_static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ a:hover {
border-right: 0.15em solid #31373e;
white-space: nowrap;
margin: 0 auto;
animation: typing 2.75s steps(40, end), blink-caret 0.75s step-end infinite;
animation:
typing 2.75s steps(40, end),
blink-caret 0.75s step-end infinite;
}

@keyframes typing {
Expand Down
10 changes: 5 additions & 5 deletions src/memray/reporters/assets/common.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe("Flame graph tooltip generation", () => {
thread_id: "merged thread",
};
expect(makeTooltipString(data, "1KiB", true)).toBe(
"File foo.py, line 10 in foo<br>1KiB total<br>3 allocations"
"File foo.py, line 10 in foo<br>1KiB total<br>3 allocations",
);
});

Expand All @@ -33,7 +33,7 @@ describe("Flame graph tooltip generation", () => {
thread_id: "0x1",
};
expect(makeTooltipString(data, "1KiB", false)).toBe(
"File foo.py, line 10 in foo<br>1KiB total<br>3 allocations<br>Thread ID: 0x1"
"File foo.py, line 10 in foo<br>1KiB total<br>3 allocations<br>Thread ID: 0x1",
);
});
test("Generate label with single allocation", () => {
Expand All @@ -43,7 +43,7 @@ describe("Flame graph tooltip generation", () => {
thread_id: "0x1",
};
expect(makeTooltipString(data, "1KiB", false)).toBe(
"File foo.py, line 10 in foo<br>1KiB total<br>1 allocation<br>Thread ID: 0x1"
"File foo.py, line 10 in foo<br>1KiB total<br>1 allocation<br>Thread ID: 0x1",
);
});
});
Expand Down Expand Up @@ -114,8 +114,8 @@ describe("Filter threads", () => {
thread_id: "0x0",
children: [],
},
2
)
2,
),
).toStrictEqual({
thread_id: "0x0",
children: [],
Expand Down
16 changes: 8 additions & 8 deletions src/memray/reporters/assets/temporal_flamegraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function findHWMAllocations(
intervals,
node_objects,
hwmSnapshot,
parent_index_by_child_index
parent_index_by_child_index,
) {
intervals.forEach((interval) => {
let [allocBefore, deallocBefore, nodeIndex, count, bytes] = interval;
Expand All @@ -108,7 +108,7 @@ function findLeakedAllocations(
node_objects,
rangeStart,
rangeEnd,
parent_index_by_child_index
parent_index_by_child_index,
) {
intervals.forEach((interval) => {
let [allocBefore, deallocBefore, nodeIndex, count, bytes] = interval;
Expand Down Expand Up @@ -150,7 +150,7 @@ function packedDataToTree(packedData, rangeStart, rangeEnd) {
" is " +
hwmBytes +
" at " +
hwmSnapshot
hwmSnapshot,
);

let plotUpdate = { shapes: [] };
Expand Down Expand Up @@ -197,14 +197,14 @@ function packedDataToTree(packedData, rangeStart, rangeEnd) {
flamegraphIntervals,
flamegraphNodeObjects,
hwmSnapshot,
parent_index_by_child_index
parent_index_by_child_index,
);
if (inverted) {
findHWMAllocations(
invertedNoImportsIntervals,
invertedNoImportsNodeObjects,
hwmSnapshot,
inverted_no_imports_parent_index_by_child_index
inverted_no_imports_parent_index_by_child_index,
);
}
} else {
Expand All @@ -215,15 +215,15 @@ function packedDataToTree(packedData, rangeStart, rangeEnd) {
flamegraphNodeObjects,
rangeStart,
rangeEnd,
parent_index_by_child_index
parent_index_by_child_index,
);
if (inverted) {
findLeakedAllocations(
invertedNoImportsIntervals,
invertedNoImportsNodeObjects,
rangeStart,
rangeEnd,
inverted_no_imports_parent_index_by_child_index
inverted_no_imports_parent_index_by_child_index,
);
}
}
Expand Down Expand Up @@ -400,7 +400,7 @@ function main() {
console.log("main");

const unique_threads = packed_data.unique_threads.map(
(tid) => packed_data.strings[tid]
(tid) => packed_data.strings[tid],
);
initThreadsDropdown({ unique_threads: unique_threads }, merge_threads);

Expand Down

0 comments on commit 3eb1f9a

Please sign in to comment.