from .hirlite import Rlite, HirliteError
from .version import __version__

__all__ = ["Rlite", "HirliteError", "__version__"]

import functools

from hirlite.hirlite import Rlite as RliteExtension, HirliteError
from hirlite.version import __version__

__all__ = ["Rlite", "HirliteError", "__version__"]


class Rlite(RliteExtension):
    def __getattr__(self, command):
        return functools.partial(self.command, command)

Add support for calling commands by attr access
Add support for calling commands by attr access

+ import functools
+ 
- from .hirlite import Rlite, HirliteError
+ from hirlite.hirlite import Rlite as RliteExtension, HirliteError
- from .version import __version__
+ from hirlite.version import __version__
  
  __all__ = ["Rlite", "HirliteError", "__version__"]
  
+ 
+ class Rlite(RliteExtension):
+     def __getattr__(self, command):
+         return functools.partial(self.command, command)
+ 
Add support for calling commands by attr access
## Code Before:
from .hirlite import Rlite, HirliteError
from .version import __version__

__all__ = ["Rlite", "HirliteError", "__version__"]

## Instruction:
Add support for calling commands by attr access
## Code After:
import functools

from hirlite.hirlite import Rlite as RliteExtension, HirliteError
from hirlite.version import __version__

__all__ = ["Rlite", "HirliteError", "__version__"]


class Rlite(RliteExtension):
    def __getattr__(self, command):
        return functools.partial(self.command, command)
