inspectr 0.0.1__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/__init__.py +0 -0
- inspectr/__main__.py +27 -0
- inspectr/authenticity.py +50 -0
- inspectr/bare_ratio.py +50 -0
- inspectr/count_exceptions.py +43 -0
- inspectr/size_counts.py +81 -0
- inspectr/with_open.py +18 -0
- inspectr-0.0.1.dist-info/METADATA +43 -0
- inspectr-0.0.1.dist-info/RECORD +13 -0
- inspectr-0.0.1.dist-info/WHEEL +5 -0
- inspectr-0.0.1.dist-info/entry_points.txt +2 -0
- inspectr-0.0.1.dist-info/licenses/LICENSE +201 -0
- inspectr-0.0.1.dist-info/top_level.txt +1 -0
inspectr/__init__.py
ADDED
File without changes
|
inspectr/__main__.py
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
import sys
|
2
|
+
import pathlib
|
3
|
+
import importlib
|
4
|
+
|
5
|
+
def main():
|
6
|
+
if len(sys.argv) < 2:
|
7
|
+
print("Usage: inspectr <subtool> [files...]")
|
8
|
+
sys.exit(1)
|
9
|
+
|
10
|
+
subtool = sys.argv[1]
|
11
|
+
args = [pathlib.Path(arg) for arg in sys.argv[2:]]
|
12
|
+
|
13
|
+
try:
|
14
|
+
mod = importlib.import_module(f"inspectr.{subtool}")
|
15
|
+
except ModuleNotFoundError:
|
16
|
+
print(f"Unknown subtool: {subtool}")
|
17
|
+
sys.exit(1)
|
18
|
+
|
19
|
+
# Each subtool should define a `main(args)` function
|
20
|
+
if not hasattr(mod, "main"):
|
21
|
+
print(f"Subtool '{subtool}' does not define a main(args) function")
|
22
|
+
sys.exit(1)
|
23
|
+
|
24
|
+
mod.main(args)
|
25
|
+
|
26
|
+
if __name__ == "__main__":
|
27
|
+
main()
|
inspectr/authenticity.py
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
import ast
|
3
|
+
import pathlib
|
4
|
+
from typing import List
|
5
|
+
|
6
|
+
|
7
|
+
def main(files: List[pathlib.Path]) -> None:
|
8
|
+
todo_count = 0
|
9
|
+
empty_try_except_count = 0
|
10
|
+
stub_functions = []
|
11
|
+
|
12
|
+
for f in files:
|
13
|
+
src = f.read_text(encoding="utf-8")
|
14
|
+
|
15
|
+
todo_count += src.count("TODO")
|
16
|
+
|
17
|
+
try:
|
18
|
+
tree = ast.parse(src, filename=str(f))
|
19
|
+
except SyntaxError:
|
20
|
+
continue # skip broken files
|
21
|
+
|
22
|
+
for node in ast.walk(tree):
|
23
|
+
# Empty try/except blocks
|
24
|
+
if isinstance(node, ast.Try):
|
25
|
+
try_empty = len(node.body) == 0
|
26
|
+
except_empty = all(len(h.body) == 0 or all(isinstance(s, ast.Pass) for s in h.body) for h in node.handlers)
|
27
|
+
if try_empty and except_empty:
|
28
|
+
empty_try_except_count += 1
|
29
|
+
|
30
|
+
# Stub functions/methods
|
31
|
+
if isinstance(node, ast.FunctionDef):
|
32
|
+
# Only consider body statements that are `pass` or empty return
|
33
|
+
is_stub = True
|
34
|
+
for stmt in node.body:
|
35
|
+
if isinstance(stmt, ast.Pass):
|
36
|
+
continue
|
37
|
+
elif isinstance(stmt, ast.Return) and stmt.value is None:
|
38
|
+
continue
|
39
|
+
else:
|
40
|
+
is_stub = False
|
41
|
+
break
|
42
|
+
if is_stub:
|
43
|
+
stub_functions.append(f"{f}:{node.name}")
|
44
|
+
|
45
|
+
print("Analysis results:")
|
46
|
+
print(f" TODO comments: {todo_count}")
|
47
|
+
print(f" Empty try/except blocks: {empty_try_except_count}")
|
48
|
+
print(f" Stub functions/methods: {len(stub_functions)}")
|
49
|
+
for stub in stub_functions:
|
50
|
+
print(f" {stub}")
|
inspectr/bare_ratio.py
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
import ast
|
3
|
+
import pathlib
|
4
|
+
from collections import defaultdict, Counter
|
5
|
+
from typing import List
|
6
|
+
|
7
|
+
|
8
|
+
def main(files: List[pathlib.Path]) -> None:
|
9
|
+
# distinct exception types
|
10
|
+
exception_types = Counter()
|
11
|
+
|
12
|
+
# Per-file counts
|
13
|
+
bare_or_exception_per_file = defaultdict(int)
|
14
|
+
other_exceptions_per_file = defaultdict(int)
|
15
|
+
|
16
|
+
for f in files:
|
17
|
+
src = f.read_text(encoding="utf-8")
|
18
|
+
try:
|
19
|
+
tree = ast.parse(src, filename=str(f))
|
20
|
+
except SyntaxError:
|
21
|
+
continue # skip broken files
|
22
|
+
|
23
|
+
for node in ast.walk(tree):
|
24
|
+
if isinstance(node, ast.ExceptHandler):
|
25
|
+
# Bare except or except Exception
|
26
|
+
if node.type is None or (isinstance(node.type, ast.Name) and node.type.id == "Exception"):
|
27
|
+
bare_or_exception_per_file[f] += 1
|
28
|
+
else:
|
29
|
+
# Count other exception types
|
30
|
+
if isinstance(node.type, ast.Tuple):
|
31
|
+
for elt in node.type.elts:
|
32
|
+
if isinstance(elt, ast.Name):
|
33
|
+
other_exceptions_per_file[f] += 1
|
34
|
+
exception_types[elt.id] += 1
|
35
|
+
elif isinstance(node.type, ast.Name):
|
36
|
+
other_exceptions_per_file[f] += 1
|
37
|
+
exception_types[node.type.id] += 1
|
38
|
+
|
39
|
+
print("Distinct exception types used (excluding bare/Exception):")
|
40
|
+
for exc, count in exception_types.most_common():
|
41
|
+
print(f" {exc}: {count} occurrence(s)")
|
42
|
+
|
43
|
+
print("\nBare excepts / 'except Exception' ratio per file:")
|
44
|
+
for f in sorted(set(list(bare_or_exception_per_file.keys()) + list(other_exceptions_per_file.keys()))):
|
45
|
+
bare = bare_or_exception_per_file.get(f, 0)
|
46
|
+
other = other_exceptions_per_file.get(f, 0)
|
47
|
+
total = bare + other
|
48
|
+
ratio = bare / total if total > 0 else 0
|
49
|
+
print(f" {f}: {bare} bare / {other} typed => ratio = {ratio:.2f}")
|
50
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
import ast
|
3
|
+
import pathlib
|
4
|
+
from collections import Counter, defaultdict
|
5
|
+
from typing import List
|
6
|
+
|
7
|
+
|
8
|
+
def main(files: List[pathlib.Path]) -> None:
|
9
|
+
exception_types = Counter()
|
10
|
+
bare_or_exception_per_file = defaultdict(int)
|
11
|
+
|
12
|
+
for f in files:
|
13
|
+
src = f.read_text(encoding="utf-8")
|
14
|
+
try:
|
15
|
+
tree = ast.parse(src, filename=str(f))
|
16
|
+
except SyntaxError:
|
17
|
+
continue # skip broken files
|
18
|
+
|
19
|
+
for node in ast.walk(tree):
|
20
|
+
if isinstance(node, ast.ExceptHandler):
|
21
|
+
# Bare except
|
22
|
+
if node.type is None:
|
23
|
+
bare_or_exception_per_file[f] += 1
|
24
|
+
# except Exception
|
25
|
+
elif isinstance(node.type, ast.Name) and node.type.id == "Exception":
|
26
|
+
bare_or_exception_per_file[f] += 1
|
27
|
+
else:
|
28
|
+
# record the exception type (support multiple names in tuple)
|
29
|
+
if isinstance(node.type, ast.Tuple):
|
30
|
+
for elt in node.type.elts:
|
31
|
+
if isinstance(elt, ast.Name):
|
32
|
+
exception_types[elt.id] += 1
|
33
|
+
elif isinstance(node.type, ast.Name):
|
34
|
+
exception_types[node.type.id] += 1
|
35
|
+
|
36
|
+
print("Distinct exception types used:")
|
37
|
+
for exc, count in exception_types.most_common():
|
38
|
+
print(f" {exc}: {count} occurrence(s)")
|
39
|
+
|
40
|
+
print("\nBare excepts or 'except Exception' per file:")
|
41
|
+
for f, count in sorted(bare_or_exception_per_file.items()):
|
42
|
+
print(f" {f}: {count}")
|
43
|
+
|
inspectr/size_counts.py
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
import ast
|
3
|
+
import pathlib
|
4
|
+
from typing import List
|
5
|
+
|
6
|
+
# TODO: put these in a config file
|
7
|
+
# Thresholds
|
8
|
+
LINE_THRESHOLD = 1000
|
9
|
+
METHOD_LINES = 50
|
10
|
+
FUNC_PARAMS = 5
|
11
|
+
CLASS_METHODS = 20
|
12
|
+
|
13
|
+
|
14
|
+
def main(files: List[pathlib.Path]) -> None:
|
15
|
+
files = list(pathlib.Path.cwd().rglob("*.py"))
|
16
|
+
|
17
|
+
# TODO: rename these
|
18
|
+
# Counters and diagnostics
|
19
|
+
files_over_1000 = []
|
20
|
+
methods_over_50 = []
|
21
|
+
functions_over_5params = []
|
22
|
+
classes_over_20methods = []
|
23
|
+
|
24
|
+
for fname in files:
|
25
|
+
with open(fname, "r", encoding="utf-8") as f:
|
26
|
+
src = f.read()
|
27
|
+
lines = src.splitlines()
|
28
|
+
if len(lines) > LINE_THRESHOLD:
|
29
|
+
files_over_1000.append((fname, len(lines)))
|
30
|
+
|
31
|
+
tree = ast.parse(src, filename=fname)
|
32
|
+
for node in ast.walk(tree):
|
33
|
+
# Functions
|
34
|
+
if isinstance(node, ast.FunctionDef):
|
35
|
+
n_params = len(node.args.args)
|
36
|
+
n_lines = len(node.body) if hasattr(node, "body") else 0
|
37
|
+
|
38
|
+
if n_params > FUNC_PARAMS:
|
39
|
+
functions_over_5params.append((fname, node.name, n_params))
|
40
|
+
if n_lines > METHOD_LINES:
|
41
|
+
methods_over_50.append((fname, node.name, n_lines))
|
42
|
+
|
43
|
+
# Classes
|
44
|
+
if isinstance(node, ast.ClassDef):
|
45
|
+
public_methods = [
|
46
|
+
n for n in node.body
|
47
|
+
if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")
|
48
|
+
]
|
49
|
+
n_public_methods = len(public_methods)
|
50
|
+
if n_public_methods > CLASS_METHODS:
|
51
|
+
method_names = [m.name for m in public_methods]
|
52
|
+
classes_over_20methods.append((fname, node.name, n_public_methods, method_names))
|
53
|
+
|
54
|
+
# Print diagnostics if counts > 0
|
55
|
+
if files_over_1000:
|
56
|
+
print(f"Files > {LINE_THRESHOLD} lines:")
|
57
|
+
for fname, nlines in files_over_1000:
|
58
|
+
print(f" {fname}: {nlines} lines")
|
59
|
+
|
60
|
+
if methods_over_50:
|
61
|
+
print(f"\nMethods > {METHOD_LINES} lines:")
|
62
|
+
for fname, name, nlines in methods_over_50:
|
63
|
+
print(f" {fname}.{name}: {nlines} lines")
|
64
|
+
|
65
|
+
if functions_over_5params:
|
66
|
+
print(f"\nFunctions > {FUNC_PARAMS} parameters:")
|
67
|
+
for fname, name, nparams in functions_over_5params:
|
68
|
+
print(f" {fname}.{name}: {nparams} parameters")
|
69
|
+
|
70
|
+
if classes_over_20methods:
|
71
|
+
print(f"\nClasses > {CLASS_METHODS} public methods:")
|
72
|
+
for fname, cls_name, nmethods, method_names in classes_over_20methods:
|
73
|
+
print(f" {fname}.{cls_name}: {nmethods} public methods -> {', '.join(method_names)}")
|
74
|
+
|
75
|
+
# Summary
|
76
|
+
print("\nSummary:")
|
77
|
+
print(f" Files > {LINE_THRESHOLD} lines: {len(files_over_1000)}")
|
78
|
+
print(f" Methods > {METHOD_LINES} lines: {len(methods_over_50)}")
|
79
|
+
print(f" Functions > {FUNC_PARAMS} parameters: {len(functions_over_5params)}")
|
80
|
+
print(f" Classes > {CLASS_METHODS} public methods: {len(classes_over_20methods)}")
|
81
|
+
|
inspectr/with_open.py
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
import ast
|
2
|
+
import pathlib
|
3
|
+
import sys
|
4
|
+
from typing import List
|
5
|
+
|
6
|
+
|
7
|
+
def main(files: List[pathlib.Path]) -> None:
|
8
|
+
if not files:
|
9
|
+
print("Usage: inspectr with_open <file1> [file2 ...]")
|
10
|
+
sys.exit(1)
|
11
|
+
|
12
|
+
for filepath in files:
|
13
|
+
tree = ast.parse(filepath.read_text(), filename=str(filepath))
|
14
|
+
for node in ast.walk(tree):
|
15
|
+
if isinstance(node, ast.Call) and getattr(node.func, "id", "")=="open":
|
16
|
+
if not any(isinstance(p, ast.With) and node in ast.walk(p) for p in ast.walk(tree)):
|
17
|
+
print(f"{filepath}:{node.lineno}: open() outside with")
|
18
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: inspectr
|
3
|
+
Version: 0.0.1
|
4
|
+
Summary: A collection of python tools to inspect code quality.
|
5
|
+
Maintainer-email: Alex Mueller <amueller474@gmail.com>
|
6
|
+
License-Expression: Apache-2.0
|
7
|
+
Project-URL: Homepage, https://github.com/ajcm474/inspectr
|
8
|
+
Project-URL: Issues, https://github.com/ajcm474/inspectr/issues
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
10
|
+
Classifier: Intended Audience :: Developers
|
11
|
+
Classifier: Programming Language :: Python
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
13
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
14
|
+
Classifier: Topic :: Software Development
|
15
|
+
Description-Content-Type: text/markdown
|
16
|
+
License-File: LICENSE
|
17
|
+
Dynamic: license-file
|
18
|
+
|
19
|
+
# inspectr
|
20
|
+
A collection of python tools to inspect code quality.
|
21
|
+
|
22
|
+
## Installation
|
23
|
+
```bash
|
24
|
+
python -m venv .venv/
|
25
|
+
source .venv/bin/activate
|
26
|
+
pip install inspectr
|
27
|
+
```
|
28
|
+
|
29
|
+
## Usage
|
30
|
+
Generally, the syntax goes:
|
31
|
+
```bash
|
32
|
+
inspectr <subtool> [files...]
|
33
|
+
```
|
34
|
+
where `<subtool>` is one of the following:
|
35
|
+
|
36
|
+
- `authenticity`: looks for TODO comments, empty try/except blocks, and stub functions
|
37
|
+
- `bare_ratio`: checks for the ratio of bare excepts to meaningful exception usage
|
38
|
+
- `count_exceptions`: counts how many of each type of exception there are (including bare except)
|
39
|
+
- `size_counts`: various linecount-related code complexity checks
|
40
|
+
- `with_open`: checks for `open` in the absense of `with` and manual calls to `close()`
|
41
|
+
|
42
|
+
**Please note:** this project is in the early alpha stage, so don't expect the above subtool names
|
43
|
+
to be stable between versions. I might even merge/split them at some point.
|
@@ -0,0 +1,13 @@
|
|
1
|
+
inspectr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
inspectr/__main__.py,sha256=Rojob_KTdzcHjItkGgA3TPLqPd223pIfeajpCWDP3Gc,652
|
3
|
+
inspectr/authenticity.py,sha256=fgKJSE_1qYE1NgLdXmOjPQjo-dwD42sEhqpcsazIj3U,1703
|
4
|
+
inspectr/bare_ratio.py,sha256=oQfag96zjGnmFHofZ5qabBGGVoKUnmRNzGq_WX_8ZZg,1997
|
5
|
+
inspectr/count_exceptions.py,sha256=UhUc3ZZY8eDxLtlLX1USKzP_JEPY3clx8R8TPvtQ5LE,1588
|
6
|
+
inspectr/size_counts.py,sha256=B-KiSoNEirNqYbaqnUASn1pdUBEnXrs_eu2cvRj26F4,2972
|
7
|
+
inspectr/with_open.py,sha256=qbCAb14cZ15yX7SbLo2C3nE1sDEKLiZ48bvFQfTAKJk,606
|
8
|
+
inspectr-0.0.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
9
|
+
inspectr-0.0.1.dist-info/METADATA,sha256=6wxAsClGG7QYvnwsixtXZLFAlKt-L9A5M9vNAatCVhg,1573
|
10
|
+
inspectr-0.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
11
|
+
inspectr-0.0.1.dist-info/entry_points.txt,sha256=IrOM4SpCRfFZzBWngg3ezXuX31ZqFBR-flSU5c8tbTo,52
|
12
|
+
inspectr-0.0.1.dist-info/top_level.txt,sha256=NlTFBMaWgYmxFzjQtp4Y6itVQQV8sBPtAAZvFnviT-A,9
|
13
|
+
inspectr-0.0.1.dist-info/RECORD,,
|
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
@@ -0,0 +1 @@
|
|
1
|
+
inspectr
|