diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 153ed6a..dc71a21 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,10 +2,10 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v5.0.0 hooks: - id: trailing-whitespace - repo: https://github.com/asottile/pyupgrade - rev: v2.37.3 + rev: v3.20.0 hooks: - id: pyupgrade diff --git a/setup.py b/setup.py index 9eec0f0..676608f 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ import sys from setuptools import setup -with open('requirements.txt', 'r') as f: +with open('requirements.txt') as f: install_requires = f.read().strip().split() needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv) diff --git a/svglib/svglib.py b/svglib/svglib.py index ac9bedf..1fc8e9a 100755 --- a/svglib/svglib.py +++ b/svglib/svglib.py @@ -172,7 +172,7 @@ def parseMultiAttributes(self, line): new_attrs = {} for a in attrs: k, v = a.split(':') - k, v = [s.strip() for s in (k, v)] + k, v = (s.strip() for s in (k, v)) new_attrs[k] = v return new_attrs