Skip to content

Commit

Permalink
Merge pull request #58 from AviAvni/update-pydantic
Browse files Browse the repository at this point in the history
remove pydantic
  • Loading branch information
LakshyAAAgrawal authored Feb 24, 2025
2 parents 9dfe2c0 + 873637e commit d1b5d03
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ authors = [
]
description = "A language-agnostic LSP client in Python, with a library interface. Intended to be used to build applications around language servers. Currently multilspy supports language servers for Python, Rust, Java, Go, JavaScript, Ruby and C#. Originally appeared as part of Monitor-Guided Decoding (https://github.com/microsoft/monitors4codegen)"
readme = "README.md"
requires-python = ">=3.7"
requires-python = ">=3.8, <4.0"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
Expand All @@ -27,8 +27,8 @@ classifiers = [

dependencies = [
"jedi-language-server==0.41.1",
"pydantic>=1.10.5, <2",
"requests==2.32.3"
"requests==2.32.3",
"typing-extensions>=4.2.0"
]

[project.urls]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
jedi-language-server==0.41.1
pytest==7.3.1
pydantic>=1.10.5, <2
pytest-asyncio==0.21.1
requests==2.32.3
typing-extensions>=4.2.0
9 changes: 5 additions & 4 deletions src/multilspy/multilspy_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
Multilspy logger module.
"""
import inspect
import json
import logging
from datetime import datetime
from pydantic import BaseModel
from typing_extensions import TypedDict

class LogLine(BaseModel):
class LogLine(TypedDict):
"""
Represents a line in the Multilspy log
"""
Expand Down Expand Up @@ -49,10 +50,10 @@ def log(self, debug_message: str, level: int, sanitized_error_message: str = "")
caller_file=caller_file,
caller_name=caller_name,
caller_line=caller_line,
message=debug_message,
message=debug_message
)

self.logger.log(
level=level,
msg=debug_log_line.json(),
msg=json.dumps(debug_log_line),
)

0 comments on commit d1b5d03

Please sign in to comment.