Skip to content

Commit 91ed077

Browse files
committed
fix: hide sem field
1 parent 69e9c56 commit 91ed077

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/lsap/capability/definition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
@define
2727
class DefinitionCapability(Capability[DefinitionRequest, DefinitionResponse]):
28-
resolve_sem: anyio.Semaphore = field(default=anyio.Semaphore(32))
28+
resolve_sem: anyio.Semaphore = field(default=anyio.Semaphore(32), init=False)
2929

3030
@cached_property
3131
def locate(self) -> LocateCapability:

src/lsap/capability/outline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
@define
2525
class OutlineCapability(Capability[OutlineRequest, OutlineResponse]):
26-
hover_sem: anyio.Semaphore = field(default=anyio.Semaphore(32))
26+
hover_sem: anyio.Semaphore = field(default=anyio.Semaphore(32), init=False)
2727

2828
@override
2929
async def __call__(self, req: OutlineRequest) -> OutlineResponse | None:

src/lsap/capability/reference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
@define
3131
class ReferenceCapability(Capability[ReferenceRequest, ReferenceResponse]):
3232
_cache: PaginationCache[ReferenceItem] = Factory(PaginationCache)
33-
process_sem: anyio.Semaphore = field(default=anyio.Semaphore(32))
33+
process_sem: anyio.Semaphore = field(default=anyio.Semaphore(32), init=False)
3434

3535
@cached_property
3636
def locate(self) -> LocateCapability:

src/lsap/capability/rename.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def should_exclude(uri: str) -> bool:
142142

143143
@define
144144
class RenamePreviewCapability(Capability[RenamePreviewRequest, RenamePreviewResponse]):
145-
file_sem: anyio.Semaphore = field(default=anyio.Semaphore(32))
145+
file_sem: anyio.Semaphore = field(default=anyio.Semaphore(32), init=False)
146146

147147
@cached_property
148148
def locate(self) -> LocateCapability:
@@ -254,7 +254,7 @@ async def _to_file_change(
254254

255255
@define
256256
class RenameExecuteCapability(Capability[RenameExecuteRequest, RenameExecuteResponse]):
257-
file_sem: anyio.Semaphore = field(default=anyio.Semaphore(32))
257+
file_sem: anyio.Semaphore = field(default=anyio.Semaphore(32), init=False)
258258

259259
@override
260260
async def __call__(self, req: RenameExecuteRequest) -> RenameExecuteResponse | None:

0 commit comments

Comments
 (0)