Code Monkey home page Code Monkey logo

Comments (1)

erutan2099 avatar erutan2099 commented on September 4, 2024

Update: after digging, I found a workaround:

in nvm.api.data.py, I edited the code to appear like this:

...

...

def no_request_handler(vim: 'StrictNvimApi', method: str, args: List[Any], sync: bool ) -> Either[List[str], Tuple[NvimApi, Any]]: return Left(List('no request handler defined'))

class StrictNvimApi(NvimApi): @staticmethod def cons( name: str, vars: Map[str, Any]=Map(), request_handler: StrictNvimHandler=no_request_handler, request_log: List[Tuple[str, List[Any]]]=Nil, ) -> 'StrictNvimApi': return StrictNvimApi(name, vars, request_handler, request_log)

class StrictNvimApi(NvimApi): @staticmethod def cons( name: str, vars: Map[str, Any]=Map(), request_handler: StrictNvimHandler=no_request_handler, request_log: List[Tuple[str, List[Any]]]=Nil, ) -> 'StrictNvimApi': return StrictNvimApi(name, vars, request_handler, request_log) def __init__( self, name: str, vars: Map[str, Any], request_handler: StrictNvimHandler, request_log: List[Tuple[str, List[Any]]], ) -> None: self.name = name self.vars = vars self.request_handler = request_handler self.request_log = request_log def request(self, method: str, args: List[Any], sync: bool, timeout: float) -> Either[str, Tuple[NvimApi, Any]]: vim = self.append1.request_log((method, args)) return self.request_handler(vim, method, args, sync).accum_error_lift(variable_request, vim, method, args) def var(self, name: str) -> Either[str, Any]: return self.vars.lift(name).to_either(f'no variable `{name}` defined')

...

...

which essentially duplicated the first function in the StrictNvimApi class. I am not 100% sure why this works, but it seems to have fixed the issue.

from ribosome.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.