Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-commit autoupdate #501

Merged
merged 3 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 16
- name: Symlink node as nodejs
run: ln -sf "$(which node)" "$(which node)js"
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down
12 changes: 6 additions & 6 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 @@ -26,7 +26,7 @@ repos:
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
Loading