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:
parent
24b9af605b
commit
78742b9546
@ -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,
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user