mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Quiet mypy on the inference_services test assignment
inference_services is a schema-loaded config option, so it's not a static attribute on GalaxyAppConfiguration -- production code reads it via getattr for the same reason. The two celery schedule tests set it directly, which trips mypy's attr-defined check, so mark those assignments type: ignore the way the other config-poking unit tests (test_vault, test_error_reporting) do.
This commit is contained in:
@@ -35,7 +35,7 @@ def test_default_configuration():
|
||||
|
||||
def test_gtn_refresh_schedules_when_inference_configured():
|
||||
config = GalaxyAppConfiguration(override_tempdir=False)
|
||||
config.inference_services = {"default": {"model": "test"}}
|
||||
config.inference_services = {"default": {"model": "test"}} # type: ignore[attr-defined]
|
||||
app = GalaxyCelery("test-gtn-schedule")
|
||||
setup_periodic_tasks(config, app)
|
||||
assert app.conf.beat_schedule["refresh-gtn-database"] == {
|
||||
@@ -46,7 +46,7 @@ def test_gtn_refresh_schedules_when_inference_configured():
|
||||
|
||||
def test_iwc_refresh_schedules_when_inference_configured():
|
||||
config = GalaxyAppConfiguration(override_tempdir=False)
|
||||
config.inference_services = {"default": {"model": "test"}}
|
||||
config.inference_services = {"default": {"model": "test"}} # type: ignore[attr-defined]
|
||||
app = GalaxyCelery("test-iwc-schedule")
|
||||
setup_periodic_tasks(config, app)
|
||||
assert app.conf.beat_schedule["refresh-iwc-manifest"] == {
|
||||
|
||||
Reference in New Issue
Block a user