diff --git a/demo_code.py b/demo_code.py index 1e336515f..cacd38c76 100644 --- a/demo_code.py +++ b/demo_code.py @@ -10,6 +10,7 @@ AWS_SECRET_KEY = "d6s$f9g!j8mg7hw?n&2" + class BaseNumberGenerator: """Declare a method -- `get_number`.""" @@ -17,7 +18,7 @@ def __init__(self): self.limits = (1, 10) def get_number(self, min_max): - raise NotImplemented + raise NotImplementedError def smethod(): """static method-to-be""" @@ -35,7 +36,7 @@ class RandomNumberGenerator: def limits(self): return self.limits - + def _test(self): return self.limits @@ -47,6 +48,7 @@ def get_number(self, min_max=[1, 10]): class ImaginaryNumber: """Class to represent an imaginary number.""" + def __init__(self): self.real = 0 self.imaginary = 1 @@ -131,11 +133,13 @@ def chained_comparison(): c = 3 return a < b and b < c + def wrong_callable(): number = ImaginaryNumber() - if hasattr(number, '__call__'): + if hasattr(number, "__call__"): return number() + if __name__ == "__main__": args = ["--disable", "all"] for i in range(len(args)):