Skip to content

Commit 9729d07

Browse files
committed
fix scripts and mypy config for new api
1 parent 67d5d47 commit 9729d07

File tree

7 files changed

+16
-13
lines changed

7 files changed

+16
-13
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,15 @@ See `CONTRIBUTING.md`.
2424

2525
## Usage
2626
to stay consistent with the language from the original paper, we recommend
27-
importing this package as `ring`:
27+
naming your chordnet attribute `ring`:
2828
```python
29-
from chordnet import Node as ring
29+
from chordnet import ChordNet
30+
31+
ring = new ChordNet(...)
32+
ring.create()
33+
# or ring.join(...)
34+
#...
35+
ring.leave()
3036
```
3137
This fits with the concept of "joining" an existing ring network, or creating a
32-
new one, (`ring.join(...)`, `ring.create()`.
33-
Examples follow this practice.
38+
new one. Examples follow this practice.

pyproject.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,11 @@ convention = "google"
119119
python_version = "3.10"
120120
warn_return_any = true
121121
warn_unused_configs = true
122+
mypy_path = "src"
122123
files = ["src", "tests", "scripts"]
123124
exclude = [
124125
'(^|.*/)__pycache__/', # matches __pycache__ at any depth
125126
'(^|.*/).ruff_cache/',
126127
'(^|.*/).mypy_cache/',
128+
'(^|.*/)dist/',
127129
]
128-
129-
[[tool.mypy.overrides]]
130-
module = ["bpython"]
131-
ignore_missing_imports = true

scripts/auto/anchor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import IPython
55

6-
from chordnet import Node as ChordNode
6+
from chordnet._node import _Node as ChordNode
77

88

99
def main() -> None:

scripts/auto/joiner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import IPython
55

6-
from chordnet import Node as ChordNode
6+
from chordnet._node import _Node as ChordNode
77

88

99
def main() -> None:

scripts/manual/anchor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import IPython
55
from step import step #type: ignore
66

7-
from chordnet import Node as ChordNode
7+
from chordnet._node import _Node as ChordNode
88

99

1010
def main() -> None:

scripts/manual/joiner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import IPython
55
from step import step #type: ignore
66

7-
from chordnet import Node as ChordNode
7+
from chordnet._node import _Node as ChordNode
88

99

1010
def main() -> None:

scripts/manual/step.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""step.py: helper for manual scripts."""
22

3-
from chordnet import Node as ChordNode
3+
from chordnet._node import _Node as ChordNode
44

55

66
def step(node: ChordNode) -> None:

0 commit comments

Comments
 (0)