Skip to content

Commit

Permalink
style(pre-commit.ci): auto fixes [...]
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Feb 9, 2024
1 parent e072d02 commit e510bf8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/psygnal/_dataclass_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

if TYPE_CHECKING:
from dataclasses import Field

import attrs
import msgspec
from pydantic import BaseModel
Expand Down Expand Up @@ -254,6 +255,7 @@ def is_kw_only(f: Field):
return True
return False


def sanitize_field_options_dict(d: Mapping) -> dict[str, Any]:
field_options_kws = [f.name for f in fields(FieldOptions) if is_kw_only(f)]
return {k: v for k, v in d.items() if k in field_options_kws}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_custom_fields.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# from __future__ import annotations

import contextlib
from typing import TYPE_CHECKING, ClassVar, Union
from typing import ClassVar, Union
from unittest.mock import Mock

import pytest
Expand Down

0 comments on commit e510bf8

Please sign in to comment.