Skip to content

Commit

Permalink
mini dep update
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasertl committed Oct 19, 2024
1 parent a622adb commit c61fa48
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 18 deletions.
4 changes: 2 additions & 2 deletions ca/django_ca/modelfields.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def formfield(
form_class: Optional[type[forms.Field]] = None,
choices_form_class: Optional[type[forms.ChoiceField]] = None,
**kwargs: Any,
) -> forms.Field:
) -> Optional[forms.Field]:
# COVERAGE NOTE: not None e.g. for ModelForm which defines a form field, but we never do that.
if form_class is None: # pragma: no branch
form_class = self.formfield_class
Expand Down Expand Up @@ -330,7 +330,7 @@ def formfield(
form_class: Optional[type[forms.Field]] = None,
choices_form_class: Optional[type[forms.ChoiceField]] = None,
**kwargs: Any,
) -> forms.Field:
) -> Optional[forms.Field]:
# COVERAGE NOTE: not None e.g. for ModelForm which defines a form field, but we never do that.
if form_class is None: # pragma: no branch
form_class = self.formfield_class
Expand Down
3 changes: 2 additions & 1 deletion ca/django_ca/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,8 @@ class Certificate(X509CertMixin):
ca = models.ForeignKey(
CertificateAuthority, on_delete=models.CASCADE, verbose_name=_("Certificate Authority")
)
csr = CertificateSigningRequestField(verbose_name=_("CSR"), blank=True, null=True)
# TYPEHINT NOTE: nullable field confuses django-stubs
csr = CertificateSigningRequestField(verbose_name=_("CSR"), blank=True, null=True) # type: ignore[misc]

# Note: We don't set choices here because the available profiles might be changed by the user.
profile = models.CharField(
Expand Down
2 changes: 1 addition & 1 deletion ca/django_ca/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def user(
@pytest.fixture()
def user_client(user: "User", client: Client) -> Iterator[Client]:
"""A Django test client logged in as a normal user."""
client.force_login(user)
client.force_login(user) # type: ignore[arg-type] # django-stubs 5.1.0 thinks user is AbstractUser
yield client


Expand Down
4 changes: 2 additions & 2 deletions requirements/requirements-dev-common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ GitPython==3.1.43
Jinja2==3.1.4
PyYAML==6.0.2
Sphinx==7.2.6
coverage[toml]==7.6.1
coverage[toml]==7.6.3
django-test-migrations==1.4.0
pytest==8.3.3
pytest-cov==5.0.0
pytest-django==4.9.0
selenium==4.25.0
semantic-version==2.10.0
tabulate==0.9.0
termcolor==2.4.0
termcolor==2.5.0
tomli==2.0.1; python_version < '3.11'
2 changes: 1 addition & 1 deletion requirements/requirements-dist.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build==1.2.2
build==1.2.2.post1
twine==5.1.1
wheel==0.44.0
# See pyproject.toml for reasoning for required minimum version
Expand Down
8 changes: 4 additions & 4 deletions requirements/requirements-lint.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-r requirements-dev-common.txt
pre-commit==3.8.0
pylint-django==2.5.5
pylint==3.3.0
ruff==0.6.7
pre-commit==4.0.1
pylint-django==2.6.1
pylint==3.3.1
ruff==0.7.0
setuptools>=65
14 changes: 7 additions & 7 deletions requirements/requirements-mypy.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
-r requirements-dev-common.txt
-r requirements-test.txt
mypy==1.11.2
django-stubs==5.0.4
types-docutils==0.21.0.20240907
django-stubs==5.1.0
types-docutils==0.21.0.20241005
types-freezegun==1.1.10
types-jinja2==2.11.9
types-mysqlclient==2.2.0.20240911
types-pytz==2024.2.0.20240913
types-psycopg2==2.9.21.20240819
types-pytz==2024.2.0.20241003
types-psycopg2==2.9.21.20241019
types-pyOpenSSL==24.1.0.20240722
types-pyRFC3339==1.1.1.5
types-redis==4.6.0.20240903
types-requests==2.32.0.20240914
types-setuptools==75.1.0.20240917
types-redis==4.6.0.20241004
types-requests==2.32.0.20241016
types-setuptools==75.2.0.20241019
types-tabulate==0.9.0.20240106

0 comments on commit c61fa48

Please sign in to comment.