inspectr 0.0.3__py3-none-any.whl → 0.0.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- inspectr/duplicates.py +2 -3
- {inspectr-0.0.3.dist-info → inspectr-0.0.4.dist-info}/METADATA +1 -1
- {inspectr-0.0.3.dist-info → inspectr-0.0.4.dist-info}/RECORD +7 -7
- {inspectr-0.0.3.dist-info → inspectr-0.0.4.dist-info}/WHEEL +0 -0
- {inspectr-0.0.3.dist-info → inspectr-0.0.4.dist-info}/entry_points.txt +0 -0
- {inspectr-0.0.3.dist-info → inspectr-0.0.4.dist-info}/licenses/LICENSE +0 -0
- {inspectr-0.0.3.dist-info → inspectr-0.0.4.dist-info}/top_level.txt +0 -0
inspectr/duplicates.py
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
# mytool/duplicates.py
|
2
1
|
import sys
|
3
2
|
import hashlib
|
4
3
|
from collections import defaultdict
|
5
4
|
|
6
|
-
def find_duplicates(files, block_size=
|
5
|
+
def find_duplicates(files, block_size=10, min_occur=3):
|
7
6
|
"""
|
8
7
|
Find duplicate blocks of code across files.
|
9
8
|
|
@@ -46,6 +45,6 @@ def main(args=None) -> None:
|
|
46
45
|
print("Usage: inspectr duplicates file1.py [file2.py ...]")
|
47
46
|
return
|
48
47
|
|
49
|
-
for fname, lnum, count in find_duplicates(args, block_size=
|
48
|
+
for fname, lnum, count in find_duplicates(args, block_size=10, min_occur=3):
|
50
49
|
print(f"{fname}:{lnum} (occurs {count} times)")
|
51
50
|
|
@@ -3,12 +3,12 @@ inspectr/__main__.py,sha256=Rojob_KTdzcHjItkGgA3TPLqPd223pIfeajpCWDP3Gc,652
|
|
3
3
|
inspectr/authenticity.py,sha256=fgKJSE_1qYE1NgLdXmOjPQjo-dwD42sEhqpcsazIj3U,1703
|
4
4
|
inspectr/bare_ratio.py,sha256=oQfag96zjGnmFHofZ5qabBGGVoKUnmRNzGq_WX_8ZZg,1997
|
5
5
|
inspectr/count_exceptions.py,sha256=UhUc3ZZY8eDxLtlLX1USKzP_JEPY3clx8R8TPvtQ5LE,1588
|
6
|
-
inspectr/duplicates.py,sha256=
|
6
|
+
inspectr/duplicates.py,sha256=xAFNO90JVEhzZqmyHg8gXAo28e_DIrB3SYh7tONAzbU,1455
|
7
7
|
inspectr/size_counts.py,sha256=Yw-k5v7lPylzfh-9SUs1PtlV3Bhvdy9X7w2Pi93xL9g,2920
|
8
8
|
inspectr/with_open.py,sha256=qbCAb14cZ15yX7SbLo2C3nE1sDEKLiZ48bvFQfTAKJk,606
|
9
|
-
inspectr-0.0.
|
10
|
-
inspectr-0.0.
|
11
|
-
inspectr-0.0.
|
12
|
-
inspectr-0.0.
|
13
|
-
inspectr-0.0.
|
14
|
-
inspectr-0.0.
|
9
|
+
inspectr-0.0.4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
10
|
+
inspectr-0.0.4.dist-info/METADATA,sha256=2YAiL5P6MPWIgR54rlkZXzt3fXxaW6CsT1vT1krn_uo,1573
|
11
|
+
inspectr-0.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
12
|
+
inspectr-0.0.4.dist-info/entry_points.txt,sha256=IrOM4SpCRfFZzBWngg3ezXuX31ZqFBR-flSU5c8tbTo,52
|
13
|
+
inspectr-0.0.4.dist-info/top_level.txt,sha256=NlTFBMaWgYmxFzjQtp4Y6itVQQV8sBPtAAZvFnviT-A,9
|
14
|
+
inspectr-0.0.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|