Avatar for the jeertmans user
jeertmans
DiffeRT
BlogDocsChangelog

fix(docs): avoid self-reference in type annotation

#218Merged
Comparing
fix-docs
(
7042a66
) with
main
(
90bdb1d
)
CodSpeed Performance Gauge
+10%
Improvements
1
Regressions
0
Untouched
17
New
0
Dropped
0
Ignored
0

Benchmarks

Improved

test_train_step
differt/tests/benchmarks/test_training.py::test_train_step
CodSpeed Performance Gauge
+10%
31.6 µs
28.7 µs

Passed

test_compile_compute_paths
differt/tests/benchmarks/test_rt.py::test_compile_compute_paths
CodSpeed Performance Gauge
+1%
1.1 s
1.1 s
test_compute_paths_in_simple_street_canyon_scene[False-None-0]
differt/tests/benchmarks/test_rt.py::test_compute_paths_in_simple_street_canyon_scene[False-None-0]
CodSpeed Performance Gauge
0%
867.7 ms
865.5 ms
test_compute_paths_in_simple_street_canyon_scene[False-None-1]
differt/tests/benchmarks/test_rt.py::test_compute_paths_in_simple_street_canyon_scene[False-None-1]
CodSpeed Performance Gauge
0%
1.8 s
1.8 s
test_compute_paths_in_simple_street_canyon_scene[True-20000-2]
differt/tests/benchmarks/test_rt.py::test_compute_paths_in_simple_street_canyon_scene[True-20000-2]
CodSpeed Performance Gauge
0%
1.9 s
1.9 s
test_compute_paths_in_simple_street_canyon_scene[True-None-2]
differt/tests/benchmarks/test_rt.py::test_compute_paths_in_simple_street_canyon_scene[True-None-2]
CodSpeed Performance Gauge
0%
1.9 s
1.9 s
test_compute_paths_in_simple_street_canyon_scene[True-None-1]
differt/tests/benchmarks/test_rt.py::test_compute_paths_in_simple_street_canyon_scene[True-None-1]
CodSpeed Performance Gauge
0%
1.8 s
1.8 s
test_compute_paths_in_simple_street_canyon_scene[False-None-2]
differt/tests/benchmarks/test_rt.py::test_compute_paths_in_simple_street_canyon_scene[False-None-2]
CodSpeed Performance Gauge
0%
1.8 s
1.8 s
test_transmitter_visibility_in_simple_street_canyon_scene
differt/tests/benchmarks/test_rt.py::test_transmitter_visibility_in_simple_street_canyon_scene
CodSpeed Performance Gauge
0%
6.7 s
6.7 s
test_fermat
differt/tests/benchmarks/test_rt.py::test_fermat
CodSpeed Performance Gauge
0%
6.7 s
6.7 s
test_compute_paths_in_simple_street_canyon_scene[False-20000-0]
differt/tests/benchmarks/test_rt.py::test_compute_paths_in_simple_street_canyon_scene[False-20000-0]
CodSpeed Performance Gauge
0%
961.8 ms
962 ms
test_compute_paths_in_simple_street_canyon_scene[False-20000-2]
differt/tests/benchmarks/test_rt.py::test_compute_paths_in_simple_street_canyon_scene[False-20000-2]
CodSpeed Performance Gauge
0%
1.9 s
1.9 s
test_compute_paths_in_simple_street_canyon_scene[True-None-0]
differt/tests/benchmarks/test_rt.py::test_compute_paths_in_simple_street_canyon_scene[True-None-0]
CodSpeed Performance Gauge
0%
626.5 ms
626.9 ms
test_image_method
differt/tests/benchmarks/test_rt.py::test_image_method
CodSpeed Performance Gauge
0%
339.5 ms
339.8 ms
test_compute_paths_in_simple_street_canyon_scene[False-20000-1]
differt/tests/benchmarks/test_rt.py::test_compute_paths_in_simple_street_canyon_scene[False-20000-1]
CodSpeed Performance Gauge
0%
1.6 s
1.6 s
test_dataloader
differt/tests/benchmarks/test_training.py::test_dataloader
CodSpeed Performance Gauge
0%
2.7 s
2.7 s
test_compute_paths_in_simple_street_canyon_scene[True-20000-0]
differt/tests/benchmarks/test_rt.py::test_compute_paths_in_simple_street_canyon_scene[True-20000-0]
CodSpeed Performance Gauge
0%
4.4 ms
4.4 ms
test_compute_paths_in_simple_street_canyon_scene[True-20000-1]
differt/tests/benchmarks/test_rt.py::test_compute_paths_in_simple_street_canyon_scene[True-20000-1]
CodSpeed Performance Gauge
0%
5.1 ms
5.1 ms

Commits

Click on a commit to change the comparison range
Base
main
90bdb1d
+10%
fix(docs): avoid self-reference in type annotation Closes #180 Due to some splitting around dots (`.`) when generating docs, including a `{self.attribute}` value in the array annotation will no be displayed as expected. Instead, only the part after `.` is kept, making the documentation look very weird. I could not find any other way to prevent this than removing existing `{self.attribute}` and replacing with `attribute`. This will no longer raise an error if the provided arguments do not match the expected shape (if runtime type checking is used), but hopefully the error will be raised anyway by internal code, e.g., when broadcasting arrays.
7042a66
17 days ago
by jeertmans
Home Terms PrivacyDocs