Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Torchaudio
Commits
af1e457e
Unverified
Commit
af1e457e
authored
Jan 29, 2021
by
Vincent QB
Committed by
GitHub
Jan 29, 2021
Browse files
Fix lint (#1209)
fix 'file-does-not-end-in-newline' and typo.
parent
ec1b3e36
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
.flake8
.flake8
+1
-1
torchaudio/csrc/sox/effects.cpp
torchaudio/csrc/sox/effects.cpp
+1
-1
torchaudio/csrc/sox/io.cpp
torchaudio/csrc/sox/io.cpp
+1
-1
No files found.
.flake8
View file @
af1e457e
[flake8]
[flake8]
max-line-length = 120
max-line-length = 120
ignore = E305,E402,E721,E741,F401,F403,F405,W503,W504,F999
ignore = E305,E402,E721,E741,F401,F403,F405,W503,W504,F999
exclude = build,docs/source,_ext,third_party
exclude = build,docs/source,_ext,third_party
\ No newline at end of file
torchaudio/csrc/sox/effects.cpp
View file @
af1e457e
...
@@ -173,7 +173,7 @@ std::tuple<torch::Tensor, int64_t> apply_effects_fileobj(
...
@@ -173,7 +173,7 @@ std::tuple<torch::Tensor, int64_t> apply_effects_fileobj(
// the file.) Therefore buffer has to always contain valid data, except after
// the file.) Therefore buffer has to always contain valid data, except after
// EOF. We default to `sox_get_globals()->bufsiz`* for buffer size and we
// EOF. We default to `sox_get_globals()->bufsiz`* for buffer size and we
// first check if there is enough data to fill the buffer. `read_fileobj`
// first check if there is enough data to fill the buffer. `read_fileobj`
// repeatedly calls `read` method until it receives the requested leng
h
t of
// repeatedly calls `read` method until it receives the requested lengt
h
of
// bytes or it reaches EOF. If we get bytes shorter than requested, that means
// bytes or it reaches EOF. If we get bytes shorter than requested, that means
// the whole audio data are fetched.
// the whole audio data are fetched.
//
//
...
...
torchaudio/csrc/sox/io.cpp
View file @
af1e457e
...
@@ -215,7 +215,7 @@ std::tuple<int64_t, int64_t, int64_t, int64_t, std::string> get_info_fileobj(
...
@@ -215,7 +215,7 @@ std::tuple<int64_t, int64_t, int64_t, int64_t, std::string> get_info_fileobj(
// For example, voribs can be found
// For example, voribs can be found
// https://github.com/dmkrepo/libsox/blob/b9dd1a86e71bbd62221904e3e59dfaa9e5e72046/src/vorbis.c#L97-L158
// https://github.com/dmkrepo/libsox/blob/b9dd1a86e71bbd62221904e3e59dfaa9e5e72046/src/vorbis.c#L97-L158
//
//
// `auto_detect_format` function only requires 256 bytes, but format-depend
a
nt
// `auto_detect_format` function only requires 256 bytes, but format-depend
e
nt
// `startread` handler might require more data. In case of vorbis, the size of
// `startread` handler might require more data. In case of vorbis, the size of
// header is unbounded, but typically 4kB maximum.
// header is unbounded, but typically 4kB maximum.
//
//
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment