Skip to content

Commit

Permalink
Add regression tests of instance attribute inference on builtins.object
Browse files Browse the repository at this point in the history
  • Loading branch information
nelfin committed Apr 13, 2021
1 parent c7ac7c0 commit f611af2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# pylint: disable=missing-docstring,unused-import
# https://github.com/PyCQA/pylint/issues/3595

import collections

class Example:
def __init__(self):
self.prev()
self.next()
def prev(self):
pass
def next(self):
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# pylint: disable=missing-docstring
# https://github.com/PyCQA/pylint/issues/4221

import random
o = object()
if random.choice([True, False]):
o.count = None
"abc".count("a")

0 comments on commit f611af2

Please sign in to comment.