Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ ci:

repos:
- repo: https://github.com/psf/black
rev: 24.10.0
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.3
rev: v0.12.8
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-yaml
- id: debug-statements
10 changes: 5 additions & 5 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def test_bsc_v1(self):
"""
target = "nailgun.config.BaseServerConfig(url='bogus')"
self.assertEqual(target, repr(BaseServerConfig('bogus')))
import nailgun
import nailgun # noqa: PLC0415

self.assertEqual(target, repr(eval(repr(BaseServerConfig('bogus')))))

Expand All @@ -237,7 +237,7 @@ def test_bsc_v2(self):
"nailgun.config.BaseServerConfig(auth='flam', url='flim')",
)
self.assertIn(repr(BaseServerConfig('flim', auth='flam')), targets)
import nailgun
import nailgun # noqa: PLC0415

self.assertIn(repr(eval(repr(BaseServerConfig('flim', auth='flam')))), targets)

Expand All @@ -262,7 +262,7 @@ def test_sc_v1(self):
"""
target = "nailgun.config.ServerConfig(url='bogus')"
self.assertEqual(target, repr(ServerConfig('bogus')))
import nailgun
import nailgun # noqa: PLC0415

self.assertEqual(target, repr(eval(repr(ServerConfig('bogus')))))

Expand All @@ -278,7 +278,7 @@ def test_sc_v2(self):
"nailgun.config.ServerConfig(auth='flam', url='flim')",
)
self.assertIn(repr(ServerConfig('flim', auth='flam')), targets)
import nailgun
import nailgun # noqa: PLC0415

self.assertIn(repr(eval(repr(ServerConfig('flim', auth='flam')))), targets)

Expand Down Expand Up @@ -307,7 +307,7 @@ def test_sc_v4(self):
"nailgun.config.ServerConfig(verify='flub', url='flim')",
)
self.assertIn(repr(ServerConfig('flim', verify='flub')), targets)
import nailgun
import nailgun # noqa: PLC0415

self.assertIn(repr(eval(repr(ServerConfig('flim', verify='flub')))), targets)

Expand Down
12 changes: 6 additions & 6 deletions tests/test_entity_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,8 @@ def test_repr_v1(self):
config.ServerConfig.get()
except (KeyError, config.ConfigFileError):
self.cfg.save()
import nailgun
import tests
import nailgun # noqa: PLC0415
import tests # noqa: PLC0415

self.assertEqual(repr(eval(repr(entity))), target)

Expand All @@ -495,8 +495,8 @@ def test_repr_v2(self):
config.ServerConfig.get()
except (KeyError, config.ConfigFileError):
self.cfg.save()
import nailgun
import tests
import nailgun # noqa: PLC0415
import tests # noqa: PLC0415

self.assertEqual(repr(eval(repr(entity))), target)

Expand All @@ -519,8 +519,8 @@ def test_repr_v3(self):
config.ServerConfig.get()
except (KeyError, config.ConfigFileError):
self.cfg.save()
import nailgun
import tests
import nailgun # noqa: PLC0415
import tests # noqa: PLC0415

self.assertEqual(repr(eval(repr(entity))), target)

Expand Down