2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 08:16:28 +00:00

refactor: Use specific lru_cache imports over entire module's

This commit is contained in:
Gavin D'souza 2022-08-02 12:00:08 +05:30
parent 24b9af605b
commit 78742b9546
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
# imports - standard imports # imports - standard imports
import functools from functools import lru_cache
import json import json
import logging import logging
import os import os
@ -149,7 +149,7 @@ class AppMeta:
return f"git@{self.remote_server}:{self.org}/{self.repo}.git" return f"git@{self.remote_server}:{self.org}/{self.repo}.git"
@functools.lru_cache(maxsize=None) @lru_cache(maxsize=None)
class App(AppMeta): class App(AppMeta):
def __init__( def __init__(
self, self,

View File

@ -1,6 +1,6 @@
# imports - standard imports # imports - standard imports
import subprocess import subprocess
import functools from functools import lru_cache
import os import os
import shutil import shutil
import json import json
@ -54,7 +54,7 @@ class Validator:
validate_app_installed_on_sites(app, bench_path=self.name) validate_app_installed_on_sites(app, bench_path=self.name)
@functools.lru_cache(maxsize=None) @lru_cache(maxsize=None)
class Bench(Base, Validator): class Bench(Base, Validator):
def __init__(self, path): def __init__(self, path):
self.name = path self.name = path