mirror of
https://github.com/natelandau/obsidian-metadata.git
synced 2025-11-17 01:13:39 -05:00
build(deps): updte dependencies
This commit is contained in:
@@ -5,7 +5,7 @@ default_stages: [commit, manual]
|
|||||||
fail_fast: true
|
fail_fast: true
|
||||||
repos:
|
repos:
|
||||||
- repo: "https://github.com/commitizen-tools/commitizen"
|
- repo: "https://github.com/commitizen-tools/commitizen"
|
||||||
rev: 3.5.2
|
rev: 3.7.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: commitizen
|
- id: commitizen
|
||||||
- id: commitizen-branch
|
- id: commitizen-branch
|
||||||
@@ -61,14 +61,14 @@ repos:
|
|||||||
entry: yamllint --strict --config-file .yamllint.yml
|
entry: yamllint --strict --config-file .yamllint.yml
|
||||||
|
|
||||||
- repo: "https://github.com/charliermarsh/ruff-pre-commit"
|
- repo: "https://github.com/charliermarsh/ruff-pre-commit"
|
||||||
rev: "v0.0.277"
|
rev: "v0.0.286"
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
args: ["--extend-ignore", "I001,D301,D401"]
|
args: ["--extend-ignore", "I001,D301,D401"]
|
||||||
exclude: tests/
|
exclude: tests/
|
||||||
|
|
||||||
- repo: "https://github.com/jendrikseipp/vulture"
|
- repo: "https://github.com/jendrikseipp/vulture"
|
||||||
rev: "v2.7"
|
rev: "v2.9.1"
|
||||||
hooks:
|
hooks:
|
||||||
- id: vulture
|
- id: vulture
|
||||||
|
|
||||||
|
|||||||
871
poetry.lock
generated
871
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -17,16 +17,16 @@
|
|||||||
obsidian-metadata = "obsidian_metadata.cli:app"
|
obsidian-metadata = "obsidian_metadata.cli:app"
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
charset-normalizer = "^3.1.0"
|
charset-normalizer = "^3.2.0"
|
||||||
emoji = "^2.6.0"
|
emoji = "^2.8.0"
|
||||||
loguru = "^0.7.0"
|
loguru = "^0.7.0"
|
||||||
python = "^3.10"
|
python = "^3.10"
|
||||||
questionary = "^1.10.0"
|
questionary = "^1.10.0"
|
||||||
regex = "^2023.6.3"
|
regex = "^2023.8.8"
|
||||||
rich = "^13.4.2"
|
rich = "^13.5.2"
|
||||||
ruamel-yaml = "^0.17.32"
|
ruamel-yaml = "^0.17.32"
|
||||||
shellingham = "^1.5.0.post1"
|
shellingham = "^1.5.3"
|
||||||
tomlkit = "^0.11.8"
|
tomlkit = "^0.12.1"
|
||||||
typer = "^0.9.0"
|
typer = "^0.9.0"
|
||||||
|
|
||||||
[tool.poetry.group.test.dependencies]
|
[tool.poetry.group.test.dependencies]
|
||||||
@@ -37,19 +37,18 @@
|
|||||||
pytest-xdist = "^3.3.1"
|
pytest-xdist = "^3.3.1"
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
black = "^23.3.0"
|
black = "^23.7.0"
|
||||||
commitizen = "^3.5.2"
|
commitizen = "^3.7.0"
|
||||||
coverage = "^7.2.7"
|
coverage = "^7.3.0"
|
||||||
interrogate = "^1.5.0"
|
interrogate = "^1.5.0"
|
||||||
mypy = "^1.4.1"
|
mypy = "^1.5.1"
|
||||||
pdoc = "^14.0.0"
|
pdoc = "^14.0.0"
|
||||||
poethepoet = "^0.20.0"
|
poethepoet = "^0.22.0"
|
||||||
pre-commit = "^3.3.3"
|
pre-commit = "^3.3.3"
|
||||||
ruff = "^0.0.277"
|
ruff = "^0.0.286"
|
||||||
sh = "^2.0.4"
|
sh = "^2.0.6"
|
||||||
typeguard = "^4.0.0"
|
types-python-dateutil = "^2.8.19.14"
|
||||||
types-python-dateutil = "^2.8.19.13"
|
vulture = "^2.9.1"
|
||||||
vulture = "^2.7"
|
|
||||||
|
|
||||||
[tool.black]
|
[tool.black]
|
||||||
line-length = 100
|
line-length = 100
|
||||||
|
|||||||
@@ -124,14 +124,10 @@ def dim(msg: str) -> None:
|
|||||||
|
|
||||||
def _log_formatter(record: dict) -> str:
|
def _log_formatter(record: dict) -> str:
|
||||||
"""Create custom log formatter based on the log level. This effects the logs sent to stdout/stderr but not the log file."""
|
"""Create custom log formatter based on the log level. This effects the logs sent to stdout/stderr but not the log file."""
|
||||||
if (
|
if record["level"].name in ("INFO", "SUCCESS", "WARNING"):
|
||||||
record["level"].name == "INFO"
|
|
||||||
or record["level"].name == "SUCCESS"
|
|
||||||
or record["level"].name == "WARNING"
|
|
||||||
):
|
|
||||||
return "<level><normal>{level: <8} | {message}</normal></level>\n{exception}"
|
return "<level><normal>{level: <8} | {message}</normal></level>\n{exception}"
|
||||||
|
|
||||||
if record["level"].name == "TRACE" or record["level"].name == "DEBUG":
|
if record["level"].name in ("TRACE", "DEBUG"):
|
||||||
return "<level><normal>{level: <8} | {message}</normal></level> <fg #c5c5c5>({name}:{function}:{line})</fg #c5c5c5>\n{exception}"
|
return "<level><normal>{level: <8} | {message}</normal></level> <fg #c5c5c5>({name}:{function}:{line})</fg #c5c5c5>\n{exception}"
|
||||||
|
|
||||||
return "<level>{level: <8} | {message}</level> <fg #c5c5c5>({name}:{function}:{line})</fg #c5c5c5>\n{exception}"
|
return "<level>{level: <8} | {message}</level> <fg #c5c5c5>({name}:{function}:{line})</fg #c5c5c5>\n{exception}"
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ def validate_csv_bulk_imports( # noqa: C901
|
|||||||
{"type": row["type"], "key": row["key"], "value": row["value"]}
|
{"type": row["type"], "key": row["key"], "value": row["value"]}
|
||||||
)
|
)
|
||||||
|
|
||||||
if row_num == 0 or row_num == 1:
|
if row_num in [0, 1]:
|
||||||
raise typer.BadParameter("Empty CSV file")
|
raise typer.BadParameter("Empty CSV file")
|
||||||
|
|
||||||
paths_to_remove = [x for x in csv_dict if x not in note_paths]
|
paths_to_remove = [x for x in csv_dict if x not in note_paths]
|
||||||
|
|||||||
@@ -481,7 +481,7 @@ class Note:
|
|||||||
MetadataType.FRONTMATTER, search_key, search_value, is_regex
|
MetadataType.FRONTMATTER, search_key, search_value, is_regex
|
||||||
) or self.contains_metadata(MetadataType.INLINE, search_key, search_value, is_regex)
|
) or self.contains_metadata(MetadataType.INLINE, search_key, search_value, is_regex)
|
||||||
|
|
||||||
if meta_type == MetadataType.FRONTMATTER or meta_type == MetadataType.INLINE:
|
if meta_type in [MetadataType.FRONTMATTER, MetadataType.INLINE]:
|
||||||
if search_key is None or re.match(r"^\s*$", search_key):
|
if search_key is None or re.match(r"^\s*$", search_key):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@@ -562,8 +562,7 @@ class Note:
|
|||||||
meta_to_delete.extend(
|
meta_to_delete.extend(
|
||||||
self._find_matching_fields(MetadataType.TAGS, key, value, is_regex)
|
self._find_matching_fields(MetadataType.TAGS, key, value, is_regex)
|
||||||
)
|
)
|
||||||
|
elif meta_type in {MetadataType.FRONTMATTER, MetadataType.INLINE}:
|
||||||
elif meta_type == MetadataType.FRONTMATTER or meta_type == MetadataType.INLINE:
|
|
||||||
if key is None or re.match(r"^\s*$", key):
|
if key is None or re.match(r"^\s*$", key):
|
||||||
log.error("A valid key must be specified.")
|
log.error("A valid key must be specified.")
|
||||||
raise typer.Exit(code=1)
|
raise typer.Exit(code=1)
|
||||||
@@ -770,7 +769,9 @@ class Note:
|
|||||||
if not is_regex:
|
if not is_regex:
|
||||||
pattern = re.escape(pattern)
|
pattern = re.escape(pattern)
|
||||||
|
|
||||||
self.file_content, num_subs = re.subn(pattern, replacement, self.file_content, re.MULTILINE)
|
self.file_content, num_subs = re.subn(
|
||||||
|
pattern, replacement, self.file_content, flags=re.MULTILINE
|
||||||
|
)
|
||||||
|
|
||||||
return num_subs > 0
|
return num_subs > 0
|
||||||
|
|
||||||
@@ -801,7 +802,7 @@ class Note:
|
|||||||
if begin == MetadataType.FRONTMATTER and end == MetadataType.FRONTMATTER:
|
if begin == MetadataType.FRONTMATTER and end == MetadataType.FRONTMATTER:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if begin == MetadataType.TAGS or end == MetadataType.TAGS:
|
if MetadataType.TAGS in {begin, end}:
|
||||||
# TODO: Implement transposing to and from tags
|
# TODO: Implement transposing to and from tags
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user