<commit_before>'test abstract classes'

__pychecker__ = 'no-classdoc'

class Abstract:
    def f(self): raise SystemError("override in subclass")
    def g(self): raise KeyError("override in subclass")
class ConcreteBad(Abstract):
    def g(self): pass
class ConcreteGood(ConcreteBad):
    def f(self): pass
a = Abstract()                          # error
cb = ConcreteBad()                      # error
cg = ConcreteGood()                     # ok, f defined

cb.g()
def f():
    class MoreBad(Abstract):
        def g(): pass
    _ = MoreBad()                       # FIXME, error not caught

import import73
class ImplAbstract(import73.AbstractLib):
    def __init__(self):
        import73.AbstractLib.__init__(self)

def lib_example():
    _ = import73.AbstractLib()          # error
    _ = ImplAbstract()                  # error
<commit_msg>use a diff var to avoid inconsistent var use warning<commit_after>'test abstract classes'

__pychecker__ = 'no-classdoc'

class Abstract:
    def f(self): raise SystemError("override in subclass")
    def g(self): raise KeyError("override in subclass")
class ConcreteBad(Abstract):
    def g(self): pass
class ConcreteGood(ConcreteBad):
    def f(self): pass
a = Abstract()                          # error
cb = ConcreteBad()                      # error
cg = ConcreteGood()                     # ok, f defined

cb.g()
def f():
    class MoreBad(Abstract):
        def g(): pass
    _ = MoreBad()                       # FIXME, error not caught

import import73
class ImplAbstract(import73.AbstractLib):
    def __init__(self):
        import73.AbstractLib.__init__(self)

def lib_example():
    _ = import73.AbstractLib()          # error
    unused = ImplAbstract()             # error

{'fraction_non_alphanumeric': 0.102475532527346, 'fraction_numerical': 0.009211283822682787, 'mean_word_length': 2.323135755258126, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7351311', 'n_tokens_mistral': 498, 'n_tokens_neox': 480, 'n_words': 142}