From 57285ed69c302fca7edb5b0442bf166cd688025e Mon Sep 17 00:00:00 2001 From: CodemodService Bot Date: Sat, 9 Aug 2025 06:53:30 -0700 Subject: [PATCH] Fix CQS signal readability-braces-around-statements in fbcode/pytorch/tokenizers (#116) Summary: Pull Request resolved: https://github.com/pytorch-labs/tokenizers/pull/116 Reviewed By: dtolnay Differential Revision: D79074284 --- src/normalizer.cpp | 3 ++- src/pre_tokenizer.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/normalizer.cpp b/src/normalizer.cpp index 04af6c5..985a96c 100644 --- a/src/normalizer.cpp +++ b/src/normalizer.cpp @@ -102,8 +102,9 @@ std::unique_ptr ReplaceNormalizer::create_regex_( } std::string ReplaceNormalizer::normalize(const std::string& input) const { - if (!regex_) + if (!regex_) { return input; + } std::string result = input; auto matches = regex_->find_all(result); diff --git a/src/pre_tokenizer.cpp b/src/pre_tokenizer.cpp index 279fc39..7383d80 100644 --- a/src/pre_tokenizer.cpp +++ b/src/pre_tokenizer.cpp @@ -151,8 +151,9 @@ std::unique_ptr RegexPreTokenizer::create_regex_( std::vector RegexPreTokenizer::pre_tokenize( const std::string& input) const { - if (!regex_) + if (!regex_) { return {}; + } std::vector results; auto matches = regex_->find_all(input);