Skip to content

Commit 41c818a

Browse files
committed
I tried to be nice but now I'm tired
1 parent 93fcaa7 commit 41c818a

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

crates/build/re_dev_tools/src/build_examples/snippets.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ fn collect_snippets_recursively(
8585
let snippet = snippet?;
8686
let meta = snippet.metadata()?;
8787
let path = snippet.path();
88+
89+
if path.file_name().is_some_and(|p| p == "__init__.py") {
90+
continue;
91+
}
92+
8893
// Compare snippet outputs sometimes leaves orphaned rrd files.
8994
if path.extension().is_some_and(|p| p == "rrd") {
9095
continue;

crates/build/re_types_builder/src/codegen/docs/snippets_ref.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,10 @@ fn collect_snippets_recursively<'o>(
398398
let meta = snippet.metadata()?;
399399
let path = snippet.path();
400400

401+
if path.file_name().is_some_and(|name| name == "__init__.py") {
402+
continue;
403+
}
404+
401405
let name = path.file_stem().unwrap().to_str().unwrap().to_owned();
402406
let name_qualified = path.strip_prefix(snippet_root_path)?.with_extension("");
403407
let name_qualified = name_qualified.to_str().unwrap().replace('\\', "/");

docs/snippets/compare_snippet_output.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ def main() -> None:
126126
dir = os.path.join(os.path.dirname(__file__), "all")
127127
for file in glob.glob(dir + "/**", recursive=True):
128128
name = os.path.basename(file)
129+
if name == "__init__.py":
130+
continue
129131
name, extension = os.path.splitext(name)
130132
if extension == ".cpp" and not args.no_cpp or extension == ".py" and not args.no_py or extension == ".rs":
131133
subdir = os.path.relpath(os.path.dirname(file), dir)

0 commit comments

Comments
 (0)