diff --git a/src/scriv/literals.py b/src/scriv/literals.py index ae460ea..ac4289d 100644 --- a/src/scriv/literals.py +++ b/src/scriv/literals.py @@ -99,12 +99,9 @@ def check_value(self, value): If it is, save the string value as `self.value`. """ - ast_Constant = getattr(ast, "Constant", None) - if ast_Constant and isinstance(value, ast_Constant): + if isinstance(value, ast.Constant): if isinstance(value.value, str): self.value = value.value - elif isinstance(value, ast.Str): - self.value = value.s def find_nested_value(