Skip to content
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
331 changes: 0 additions & 331 deletions .github/scripts/run-clang-format.py

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,36 +40,6 @@ jobs:
exit 1
fi

# c-source:
# uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
# permissions:
# id-token: write
# contents: read
# with:
# repository: pytorch/vision
# test-infra-ref: main
# script: |
# set -euo pipefail

# echo '::group::Setup environment'
# CONDA_PATH=$(which conda)
# eval "$(${CONDA_PATH} shell.bash hook)"
# conda create --name ci --quiet --yes -c conda-forge python=3.9 clang-format
# conda activate ci
# echo '::endgroup::'


# echo '::group::Lint C source'
# set +e
# ./.github/scripts/run-clang-format.py -r torchvision/csrc --exclude "torchvision/csrc/io/image/cpu/giflib/*"

# if [ $? -ne 0 ]; then
# git --no-pager diff
# exit 1
# fi
# echo '::endgroup::'


python-types:
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
permissions:
Expand Down
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,12 @@ repos:
rev: 6.1.1
hooks:
- id: pydocstyle

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.3
hooks:
- id: clang-format
name: clang-format
files: \.(cpp|hpp|c|h|cu)$
types: [file]
exclude: ^torchvision/csrc/io/image/cpu/giflib/
4 changes: 2 additions & 2 deletions torchvision/csrc/io/decoder/gpu/gpu_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ void GPUDecoder::seek(double timestamp, bool keyframes_only) {
demuxer.seek(timestamp, flag);
}

c10::Dict<std::string, c10::Dict<std::string, double>>
GPUDecoder::get_metadata() const {
c10::Dict<std::string, c10::Dict<std::string, double>> GPUDecoder::
get_metadata() const {
c10::Dict<std::string, c10::Dict<std::string, double>> metadata;
c10::Dict<std::string, double> video_metadata;
video_metadata.insert("duration", demuxer.get_duration());
Expand Down
Loading