From 32a838c8e4df0dc9fac0ed5a0323e109bfafc064 Mon Sep 17 00:00:00 2001 From: Nathaniel Landau Date: Sat, 11 Mar 2023 16:27:38 -0500 Subject: [PATCH] ci: fix ruff linting --- .github/workflows/automated-tests.yml | 2 +- src/obsidian_metadata/_utils/utilities.py | 7 +++++-- src/obsidian_metadata/models/metadata.py | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/automated-tests.yml b/.github/workflows/automated-tests.yml index b262750..aac9f4f 100644 --- a/.github/workflows/automated-tests.yml +++ b/.github/workflows/automated-tests.yml @@ -67,7 +67,7 @@ jobs: - name: Lint with Mypy run: poetry run mypy src/ - name: lint with ruff - run: poetry run ruff --extend-ignore=I001,D301,D401,PLR2004,PLR0913 src/ + run: poetry run ruff --extend-ignore=I001,D301,D401 src/ - name: check pyproject.toml run: poetry run poetry check diff --git a/src/obsidian_metadata/_utils/utilities.py b/src/obsidian_metadata/_utils/utilities.py index 16a4561..1e901c6 100644 --- a/src/obsidian_metadata/_utils/utilities.py +++ b/src/obsidian_metadata/_utils/utilities.py @@ -63,12 +63,15 @@ def dict_contains( return key in dictionary and value in dictionary[key] -def dict_values_to_lists_strings(dictionary: dict, strip_null_values: bool = False) -> dict: +def dict_values_to_lists_strings( + dictionary: dict, + strip_null_values: bool = False, +) -> dict: """Convert all values in a dictionary to lists of strings. Args: dictionary (dict): Dictionary to convert - strip_null (bool): Whether to strip null values + strip_null_values (bool): Whether to strip null values Returns: dict: Dictionary with all values converted to lists of strings diff --git a/src/obsidian_metadata/models/metadata.py b/src/obsidian_metadata/models/metadata.py index 2c5adb3..12d4fca 100644 --- a/src/obsidian_metadata/models/metadata.py +++ b/src/obsidian_metadata/models/metadata.py @@ -226,7 +226,7 @@ class Frontmatter: """Grab metadata from a note. Args: - note_path (Path): Path to the note file. + file_content (str): Content of the note. Returns: dict: Metadata from the note.