diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 34d8160..9192bf7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ ci: repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.8.0 + rev: v3.14.0 hooks: - id: pyupgrade args: [--py38-plus] @@ -16,7 +16,7 @@ repos: hooks: - id: isort - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.9.1 hooks: - id: black - repo: https://github.com/collective/zpretty @@ -24,11 +24,11 @@ repos: hooks: - id: zpretty - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 6.1.0 hooks: - id: flake8 - repo: https://github.com/codespell-project/codespell - rev: v2.2.5 + rev: v2.2.6 hooks: - id: codespell additional_dependencies: @@ -55,7 +55,7 @@ repos: - id: check-python-versions args: ['--only', 'setup.py,pyproject.toml'] - repo: https://github.com/collective/i18ndude - rev: "6.0.0" + rev: "6.1.0" hooks: - id: i18ndude diff --git a/plone/app/querystring/queryparser.py b/plone/app/querystring/queryparser.py index 4ade30e..1f0a056 100644 --- a/plone/app/querystring/queryparser.py +++ b/plone/app/querystring/queryparser.py @@ -412,7 +412,7 @@ def _referenceIs(context, row): portal_url = getToolByName(context, "portal_url") portal = portal_url.getPortalObject() - if type(path) == list: + if isinstance(path, list): path = path[0] obj = portal.restrictedTraverse(str(path), None) diff --git a/plone/app/querystring/tests/testIndexmodifiers.py b/plone/app/querystring/tests/testIndexmodifiers.py index 76bdddc..f9e6b14 100644 --- a/plone/app/querystring/tests/testIndexmodifiers.py +++ b/plone/app/querystring/tests/testIndexmodifiers.py @@ -39,7 +39,7 @@ def test_date_modifier_list(self): self.assertTrue(isinstance(modifier(query)[1]["query"][0], datetime)) def test_date_modifier_list_DateTime(self): - """Test a case with largerThanRelativeDate operatiors, where + """Test a case with largerThanRelativeDate operators, where plone.app.querystring.querybuilder parses a querystring like this one: >>> query