Commit c369d69
Suppress fbcode-nonempty-init-py lint warnings
Summary:
The fbcode-nonempty-init-py patternlint rule recommends keeping
__init__.py files empty and moving initialization code to a
separate module. However, for torchcomms this would not help:
we would still need to import those modules from __init__.py
to ensure they run at package import time (e.g., loading
libtorchcomms.so, registering metaclasses, setting up backends).
Moving the code out and re-importing it just adds indirection
with no benefit.
Add patternlint-disable comments to suppress the advice-level
warnings in the affected __init__.py files.
Differential Revision: D951559931 parent e2089a6 commit c369d69
File tree
5 files changed
+5
-0
lines changed- comms/torchcomms
- distwrap
- functional
- hooks
- fr
5 files changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
0 commit comments