Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too many positinal args reported on hashlib.shake_128().hexdigest(n) #5565

Closed
tushar-deepsource opened this issue Dec 20, 2021 · 1 comment
Closed
Labels
Duplicate 🐫 Duplicate of an already existing issue

Comments

@tushar-deepsource
Copy link
Contributor

tushar-deepsource commented Dec 20, 2021

Bug description

'''test'''
import hashlib

hashlib.shake_128(b'abcd').hexdigest(4)

Configuration

No response

Command used

pylint mytest.py

Pylint output

************* Module mytest
mytest.py:4:0: E1121: Too many positional arguments for method call (too-many-function-args)

Expected behavior

No issues.

https://docs.python.org/3/library/hashlib.html#shake-variable-length-digests States that shake_128 and shake_256 return different objects, whose hexdigest() function takes in a length parameter.

I did some digging and found that all other objects return a _hashlib.HASH object while shake_128 and shake_256 return a _hashlib.HASHXOF object, both of which are defined in C.

Pylint version

pylint 2.11.1
astroid 2.8.6-dev0
Python 3.10.0 (default, Oct 13 2021, 06:45:00) [Clang 13.0.0 (clang-1300.0.29.3)]

OS / Environment

MacOS monterey

Additional dependencies

No response

@tushar-deepsource tushar-deepsource added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Dec 20, 2021
@Pierre-Sassoulas Pierre-Sassoulas added False Positive 🦟 A message is emitted but nothing is wrong with the code and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Dec 20, 2021
@jacobtylerwalls
Copy link
Member

Dupe of #4039

@jacobtylerwalls jacobtylerwalls added Duplicate 🐫 Duplicate of an already existing issue and removed False Positive 🦟 A message is emitted but nothing is wrong with the code labels Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate 🐫 Duplicate of an already existing issue
Projects
None yet
Development

No branches or pull requests

3 participants