From 7a5559f4020ebef9d9006c8454ad57ee0bde16ee Mon Sep 17 00:00:00 2001 From: Joachim Jablon Date: Sat, 9 Mar 2024 23:38:24 +0100 Subject: [PATCH 1/2] Fix Pyright --- procrastinate/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/procrastinate/cli.py b/procrastinate/cli.py index 7fd0eedb2..ade052538 100644 --- a/procrastinate/cli.py +++ b/procrastinate/cli.py @@ -86,9 +86,9 @@ def __init__(self, *args, negative: str | None, **kwargs): super().__init__(*args, **kwargs) self.negative = negative - def __call__(self, parser, ns, values, option): + def __call__(self, parser, ns, values, option=None): if self.negative is None: - setattr(ns, self.dest, not option.startswith("--no-")) + setattr(ns, self.dest, option and not option.startswith("--no-")) return setattr(ns, self.dest, option != self.negative) From 17dad90dcd3cfb2addd037e60d5f53df8928e9be Mon Sep 17 00:00:00 2001 From: Joachim Jablon Date: Sat, 9 Mar 2024 23:39:17 +0100 Subject: [PATCH 2/2] Update pyright deps --- .pre-commit-config.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d64f01a07..51898efeb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,18 +34,18 @@ repos: - id: pyright additional_dependencies: - aiopg==1.4.0 - - anyio==4.2.0 + - anyio==4.3.0 - asgiref==3.7.2 - attrs==23.2.0 - - croniter==2.0.1 - - django==4.2.9 + - croniter==2.0.2 + - django==4.2.11 - django-stubs==4.2.7 - - importlib-resources==6.1.1 - - psycopg[pool]==3.1.17 + - importlib-resources==6.1.3 + - psycopg[pool]==3.1.18 - psycopg2-binary==2.9.9 - - python-dateutil==2.8.2 - - sqlalchemy==2.0.25 - - typing-extensions==4.9.0 + - python-dateutil==2.9.0.post0 + - sqlalchemy==2.0.28 + - typing-extensions==4.10.0 - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.3.2 hooks: