Passed
Push — main ( decce2...824c9b )
by Douglas
01:33
created

sync   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 18
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A DocSync.fix_api() 0 13 2
1
"""
2
Verify that parts of the docs match what's in the code.
3
"""
4
from __future__ import annotations
5
6
from pathlib import Path
7
8
_root = (Path(__file__).parent.parent / "mandos").absolute()
9
10
11
class DocSync:
12
    def fix_api(self) -> DocSync:
13
        for py in _root.glob("**/*.py"):
14
            fixed = (
15
                "   mandos."
16
                + (
17
                    str(py.relative_to(_root).with_suffix(""))
18
                    .replace("/", ".")
19
                    .replace("\\", ".")
20
                    .replace("__init__", "")
21
                )
22
            ).rstrip(".")
23
            print(fixed)
24
        return self
25
26
27
if __name__ == "__main__":
28
    DocSync().fix_api()
29