B305 triggered for methods in regular objects
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 123
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 5
Description
class A:
def next(self):
return 'x'
The code above triggers "B305: .next() is not a thing on Python 3. Use the next() builtin. For Python 2 compatibility, use six.next()". While the code has other problem (shadowing builtin name), it is not related to generator.next() removed in Py3.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the B305 warning with the regular-object example and locate the B305 implementation and its existing tests. Confirm that generator.next() compatibility warnings still work while a regular object's next method is not reported, then add a regression test for the distinction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100