diff --git a/rich/rule.py b/rich/rule.py index f1159524..fb3d4327 100644 --- a/rich/rule.py +++ b/rich/rule.py @@ -51,13 +51,9 @@ class Rule(JupyterMixin): ) -> RenderResult: width = options.max_width - # Python3.6 doesn't have an isascii method on str - isascii = getattr(str, "isascii", None) or ( - lambda s: all(ord(c) < 128 for c in s) - ) characters = ( "-" - if (options.ascii_only and not isascii(self.characters)) + if (options.ascii_only and not self.characters.isascii()) else self.characters )