Agent-Hellboy / Agent-Hellboy/find-unused-import

Find probable issues/missed casses

Offen
#1 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
hacktoberfest
Vorherrschende Sprache
Python
Sterne
5
Forks
0
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

some probable issue
1 ->
`asname` is not a mandatory field in ast.alias class maybe `OBJECTS.append(obj.asname)` will raise an error.
from python ast documentaion
https://docs.python.org/3/library/ast.html
```
class ast.alias(name, asname)
Both parameters are raw strings of the names. asname can be None if the regular name is to be used.
```
Here we are just adding this field value i.e None to the OBJECTS list what if we were finding `asname` which is None in this case in the AST_NODE dictionary.
It will throw KeyError
There must be some cases described above

2 ->
There is one obvious missed case, the hint is in 1 and
`from os import path as img_path`

3 ->
None of the nodes related to match of latest python releases is parsed currently i.e `find_unused_imports` will not work with the latest python releases

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.