InspectorTiger
IT, Inspector Tiger, is a modern python code review tool / framework. It comes with bunch of pre-defined handlers which warns you about improvements and possible bugs. Beside these handlers, you can write your own or use community ones.
ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
class Foo(SomeObjects):
def bar(self, x=[], y: Union[int, None] = None):
x.append(1)
for _ in range(3):
try:
super(bla, bla).foo_baz()
except Exception:
print("An exception")
except AttributeError:
print("An attribute error")
finally:
continue
my_iterable = list(token[0] for token in tokens)
for a in my_iterable:
yield a
my_other_iterable = list(map(itemgetter(0), tokens))
for a in range(len(my_other_iterable)):
print(a, "=>", my_other_iterable[a])
Think about this piece of code, you see some bugs or improvements, don't you? But what if there were hundreds of lines code in this form inside your big codebase. How would you find these patterns? By writing regex queries? LOL, of course not.
$ it example.py
[Inspector Tiger] INFO - InspectorTiger inspected 🔎 and found these problems;
[Inspector Tiger] INFO -
[upgrade]
- example.py:1:0 => ALPHABET_CONSTANT
- example.py:5:27 => OPTIONAL
- example.py:9:16 => SUPER_ARGS
- example.py:17:22 => USE_COMPREHENSION
- example.py:18:8 => YIELD_FROM
- example.py:21:28 => MAP_USE_COMPREHENSION
- example.py:22:8 => BUILTIN_ENUMERATE
[general]
- example.py:5:4 => DEFAULT_MUTABLE_ARG
- example.py:8:12 => CONTROL_FLOW_INSIDE_FINALLY
- example.py:8:12 => UNREACHABLE_EXCEPT
Tutorials
API
Also Inspector Tiger comes with a builtin server (it.server) which offers a
basic REST API. If you want to try it without downloading, you can use our heroku instance.
(.venv) [ 6:02PM ] [ isidentical@x200 ]
$ curl -s https://inspector.herokuapp.com -d '{"source": "Union[MyType, None]"}' | jq
{
"status": "success",
"result": {
"upgradeable": [
{
"code": "OPTIONAL",
"column": 0,
"lineno": 1,
"filename": "<unknown>"
}
]
}
}
Metadata
Release files for it 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| it-1.0.0.tar.gz | 15.0 kB | Without provenance | Details for it-1.0.0.tar.gz |
Release files / it-1.0.0.tar.gz
| Download URL | it-1.0.0.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1e1ab603798ebc895333f3753019a4be34a73e8eda7dc5f911916889a838cb2
|
|
BLAKE2b-256 checksum How to use checksums |
e1245b67099bb421a21e0d674e1ed8a7eb418cb1a03380217294aea8e5dc1496
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.9.0a6+
|
Security for it 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.