Commit 7e77932
committed
fix: make TableWidget import-safe when traitlets is missing
- Added a mock fallback for 'traitlets' in bigframes/display/anywidget.py to avoid NameError during class definition when the package is not installed.
- Moved 'pytest.importorskip' calls in tests/unit/display/test_anywidget.py to the top to ensure tests are skipped before attempting any imports from the module under test.
- Added noqa: E402 to suppress flake8 warnings for imports after importorskip.1 parent 387246a commit 7e77932
File tree
2 files changed
+7
-3
lines changed- bigframes/display
- tests/unit/display
2 files changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 21 | | |
25 | 22 | | |
26 | 23 | | |
27 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
0 commit comments