Merge pull request #39 from abbassix/patch-1

using f-strings instead of % operator
This commit is contained in:
Luciano Ramalho
2025-05-19 16:43:35 -03:00
committed by GitHub

View File

@@ -482,7 +482,7 @@
" self.y = y\n", " self.y = y\n",
"\n", "\n",
" def __repr__(self):\n", " def __repr__(self):\n",
" return 'Vector(%r, %r)' % (self.x, self.y)\n", " return f'Vector({self.x!r}, {self.y!r})'\n",
"\n", "\n",
" def __abs__(self):\n", " def __abs__(self):\n",
" return math.hypot(self.x, self.y)\n", " return math.hypot(self.x, self.y)\n",