We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
test_bytes.py
class Sample: # warns about E0308: invalid-bytes-returned def __bytes__(self): return "hey".encode('utf-8') # will print <class 'bytes'> print(type(bytes(Sample())))
$ python test_bytes.py <class 'bytes'> $ pylint test_bytes.py ************* Module test_bytes test_bytes.py:1:0: C0114: Missing module docstring (missing-module-docstring) test_bytes.py:1:0: C0114: Missing module docstring (missing-module-docstring) test_bytes.py:1:0: C0115: Missing class docstring (missing-class-docstring) test_bytes.py:4:4: E0308: __bytes__ does not return bytes (invalid-bytes-returned) test_bytes.py:1:0: R0903: Too few public methods (1/2) (too-few-public-methods) ------------------------------------- Your code has been rated at -10.00/10
I get an E0308.
Not to get an E03008.
pylint 2.5.2 astroid 2.4.1 Python 3.7.7 (default, Mar 23 2020, 11:12:08) [GCC 9.3.0]
The text was updated successfully, but these errors were encountered:
Separate string and bytes classes patching
12273cc
Fixes pylint-dev/pylint#3599
Separate string and bytes classes patching (#807)
ec96745
Separate string and bytes classes patching (pylint-dev#807)
2ed75d4
PCManticore
Successfully merging a pull request may close this issue.
Steps to reproduce
test_bytes.py
Current behavior
I get an E0308.
Expected behavior
Not to get an E03008.
pylint --version output
The text was updated successfully, but these errors were encountered: