-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This part one of many to add better type deduction to Refurb. Previously I only pulled type out of `NameExpr` nodes because it was convienent, but this left out a lot of node types, meaning Refurb could not detect them. This new change allows for extracting the type of an AST node, meaning Refurb will (in the future) be much better at detecting certain checks. This is still in the works and has only been applied to one check, but as time goes on, this will start to be implemented for more checks.
- Loading branch information
Showing
4 changed files
with
88 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
test/data/err_181.py:19:1 [FURB181]: Replace `blake2b().digest().hex()` with `blake2b().hexdigest()` | ||
test/data/err_181.py:20:1 [FURB181]: Replace `blake2s().digest().hex()` with `blake2s().hexdigest()` | ||
test/data/err_181.py:21:1 [FURB181]: Replace `md5().digest().hex()` with `md5().hexdigest()` | ||
test/data/err_181.py:22:1 [FURB181]: Replace `sha1().digest().hex()` with `sha1().hexdigest()` | ||
test/data/err_181.py:23:1 [FURB181]: Replace `sha224().digest().hex()` with `sha224().hexdigest()` | ||
test/data/err_181.py:24:1 [FURB181]: Replace `sha256().digest().hex()` with `sha256().hexdigest()` | ||
test/data/err_181.py:25:1 [FURB181]: Replace `sha384().digest().hex()` with `sha384().hexdigest()` | ||
test/data/err_181.py:26:1 [FURB181]: Replace `sha3_224().digest().hex()` with `sha3_224().hexdigest()` | ||
test/data/err_181.py:27:1 [FURB181]: Replace `sha3_256().digest().hex()` with `sha3_256().hexdigest()` | ||
test/data/err_181.py:28:1 [FURB181]: Replace `sha3_384().digest().hex()` with `sha3_384().hexdigest()` | ||
test/data/err_181.py:29:1 [FURB181]: Replace `sha3_512().digest().hex()` with `sha3_512().hexdigest()` | ||
test/data/err_181.py:30:1 [FURB181]: Replace `sha512().digest().hex()` with `sha512().hexdigest()` | ||
test/data/err_181.py:31:1 [FURB181]: Replace `shake_128().digest(10).hex()` with `shake_128().hexdigest(10)` | ||
test/data/err_181.py:32:1 [FURB181]: Replace `shake_256().digest(10).hex()` with `shake_256().hexdigest(10)` | ||
test/data/err_181.py:34:1 [FURB181]: Replace `hashlib.sha256().digest().hex()` with `hashlib.sha256().hexdigest()` | ||
test/data/err_181.py:36:1 [FURB181]: Replace `sha256(b"text").digest().hex()` with `sha256(b"text").hexdigest()` | ||
test/data/err_181.py:38:1 [FURB181]: Replace `hash_algo().digest().hex()` with `hash_algo().hexdigest()` | ||
test/data/err_181.py:41:1 [FURB181]: Replace `h.digest().hex()` with `h.hexdigest()` | ||
test/data/err_181.py:20:1 [FURB181]: Replace `blake2b().digest().hex()` with `blake2b().hexdigest()` | ||
test/data/err_181.py:21:1 [FURB181]: Replace `blake2s().digest().hex()` with `blake2s().hexdigest()` | ||
test/data/err_181.py:22:1 [FURB181]: Replace `md5().digest().hex()` with `md5().hexdigest()` | ||
test/data/err_181.py:23:1 [FURB181]: Replace `sha1().digest().hex()` with `sha1().hexdigest()` | ||
test/data/err_181.py:24:1 [FURB181]: Replace `sha224().digest().hex()` with `sha224().hexdigest()` | ||
test/data/err_181.py:25:1 [FURB181]: Replace `sha256().digest().hex()` with `sha256().hexdigest()` | ||
test/data/err_181.py:26:1 [FURB181]: Replace `sha384().digest().hex()` with `sha384().hexdigest()` | ||
test/data/err_181.py:27:1 [FURB181]: Replace `sha3_224().digest().hex()` with `sha3_224().hexdigest()` | ||
test/data/err_181.py:28:1 [FURB181]: Replace `sha3_256().digest().hex()` with `sha3_256().hexdigest()` | ||
test/data/err_181.py:29:1 [FURB181]: Replace `sha3_384().digest().hex()` with `sha3_384().hexdigest()` | ||
test/data/err_181.py:30:1 [FURB181]: Replace `sha3_512().digest().hex()` with `sha3_512().hexdigest()` | ||
test/data/err_181.py:31:1 [FURB181]: Replace `sha512().digest().hex()` with `sha512().hexdigest()` | ||
test/data/err_181.py:32:1 [FURB181]: Replace `shake_128().digest(10).hex()` with `shake_128().hexdigest(10)` | ||
test/data/err_181.py:33:1 [FURB181]: Replace `shake_256().digest(10).hex()` with `shake_256().hexdigest(10)` | ||
test/data/err_181.py:35:1 [FURB181]: Replace `hashlib.sha256().digest().hex()` with `hashlib.sha256().hexdigest()` | ||
test/data/err_181.py:37:1 [FURB181]: Replace `sha256(b"text").digest().hex()` with `sha256(b"text").hexdigest()` | ||
test/data/err_181.py:39:1 [FURB181]: Replace `hash_algo().digest().hex()` with `hash_algo().hexdigest()` | ||
test/data/err_181.py:42:1 [FURB181]: Replace `h.digest().hex()` with `h.hexdigest()` | ||
test/data/err_181.py:45:1 [FURB181]: Replace `b.digest().hex()` with `b.hexdigest()` | ||
test/data/err_181.py:48:1 [FURB181]: Replace `s.digest(10).hex()` with `s.hexdigest(10)` | ||
test/data/err_181.py:55:1 [FURB181]: Replace `c.h.digest().hex()` with `c.h.hexdigest()` | ||
test/data/err_181.py:56:1 [FURB181]: Replace `c.b.digest().hex()` with `c.b.hexdigest()` |