Skip to content

Commit 6d21b41

Browse files
fangyi-zhoumeta-codesync[bot]
authored andcommitted
Fix fmt issue on trunk (#2810)
Summary: Fix CI issue on trunk due to fmt issues Pull Request resolved: #2810 Test Plan: `cargo fmt` Reviewed By: rchen152 Differential Revision: D96842582 Pulled By: fangyi-zhou fbshipit-source-id: 997b4cf91704006f66e01e426b7cb17c6c5a9b68
1 parent 44f2a8c commit 6d21b41

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

pyrefly/lib/stubgen/mod.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ mod tests {
2727
use crate::test::util::TestEnv;
2828

2929
fn run_stubgen(input: &str) -> String {
30-
run_stubgen_with_config(input, &ExtractConfig {
31-
include_private: false,
32-
include_docstrings: false,
33-
})
30+
run_stubgen_with_config(
31+
input,
32+
&ExtractConfig {
33+
include_private: false,
34+
include_docstrings: false,
35+
},
36+
)
3437
}
3538

3639
fn run_stubgen_with_config(input: &str, config: &ExtractConfig) -> String {
@@ -107,10 +110,10 @@ mod tests {
107110
let expected = fs_anyhow::read_to_string(&expected_path)
108111
.unwrap()
109112
.replace("\r\n", "\n");
110-
// Strip the @generated header and trim whitespace so the expected
113+
// Strip the AT generated header and trim whitespace so the expected
111114
// files can keep the header for tooling without affecting comparison.
112115
let expected = expected
113-
.strip_prefix("# @generated\n")
116+
.strip_prefix(&format!("# @{}generated\n", "")) // Avoid this file from being recognized as generated
114117
.unwrap_or(&expected)
115118
.trim()
116119
.to_owned();

0 commit comments

Comments
 (0)