Skip to content

Commit

Permalink
chore(deps): Update black to v24.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MatejKastak committed Mar 30, 2024
1 parent 1e18995 commit f5eb31d
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 62 deletions.
8 changes: 5 additions & 3 deletions plugins/yls-yara/yls_yara/linting.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@ def parse_yara_warnings_and_hints(document, problems: List[str]) -> List[Diagnos
range=utils.range_from_coords((line, start_char), (line, end_char)),
message=error_msg,
source=SOURCE_YARA,
severity=DiagnosticSeverity.Hint
if problem_full.startswith("hint")
else DiagnosticSeverity.Warning,
severity=(
DiagnosticSeverity.Hint
if problem_full.startswith("hint")
else DiagnosticSeverity.Warning
),
)
res.append(diagnostic)

Expand Down
83 changes: 34 additions & 49 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "MIT"
include = ["py.typed", "LICENSE", "LICENSE-THIRD-PARTY"]

[tool.poetry.group.dev.dependencies]
black = "^22.3.0"
black = "^24.3.0"
isort = "^5.10.1"
poethepoet = "^0.13.1"
pytest = "^7.2.2"
Expand Down
9 changes: 3 additions & 6 deletions yls/hookspecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@


@hookspec(firstresult=True)
def create_yaramod_instance() -> yaramod.Yaramod | None:
...
def create_yaramod_instance() -> yaramod.Yaramod | None: ...


@hookspec
Expand All @@ -55,8 +54,7 @@ def yls_completion(params: CompletionParams, document: Document) -> list[Complet
@hookspec(firstresult=True)
def yls_formatting(
ls: Any, params: DocumentFormattingParams, document: Document
) -> list[TextEdit] | None:
...
) -> list[TextEdit] | None: ...


@hookspec
Expand All @@ -70,8 +68,7 @@ def yls_supported_commands(ls: Any) -> list[str]: # type: ignore


@hookspec
def yls_execute_command(command: str, ls: Any, params: Any) -> PluggyRes[Any | None]:
...
def yls_execute_command(command: str, ls: Any, params: Any) -> PluggyRes[Any | None]: ...


@hookspec
Expand Down
8 changes: 5 additions & 3 deletions yls/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,11 @@ async def hover(

def lint(
ls: YaraLanguageServer,
params: lsp_types.DidOpenTextDocumentParams
| lsp_types.DidChangeTextDocumentParams
| lsp_types.DidSaveTextDocumentParams,
params: (
lsp_types.DidOpenTextDocumentParams
| lsp_types.DidChangeTextDocumentParams
| lsp_types.DidSaveTextDocumentParams
),
) -> None:
"""Lint and publish diagnostics."""
# NOTE: DiagnosticRelatedInformation can be used to show the redefinition of a rule/string
Expand Down

0 comments on commit f5eb31d

Please sign in to comment.