Browse code

fix illegal syntax

Bas Nijholt authored on 17/10/2019 09:20:34
Showing 1 changed files
... ...
@@ -80,6 +80,6 @@ class _RequireAttrsABCMeta(abc.ABCMeta):
80 80
                     raise TypeError(
81 81
                         f"The attribute '{name}' is of {type_} instead of {type(x)}."
82 82
                     )
83
-            except AttributeError as e:
84
-                raise e(f"Required attribute {name} not set in __init__.")
83
+            except AttributeError:
84
+                raise AttributeError(f"Required attribute {name} not set in __init__.")
85 85
         return obj