Skip to content

Commit

Permalink
Release fixes (#142)
Browse files Browse the repository at this point in the history
* Update scopestree.py (#136)

* var eval fix (#138)

* var eval fix

* better code, remove else

* run black formatter

* sonarcloud fixes

* added imports inside functions instead (#141)

---------

Co-authored-by: M Mograbi <[email protected]>
  • Loading branch information
AlexFernandes-MOVAI and Mograbi authored May 12, 2023
1 parent c3cf7d3 commit 0f3ab05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dal/tools/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@

import argparse
import hashlib
import importlib
import json
import os
import pickle
import re
import sys
from importlib import import_module
from dal.movaidb.database import MovaiDB
from dal.models.scopestree import scopes


def test_reachable(redis_url):
Expand All @@ -41,6 +38,7 @@ def test_reachable(redis_url):

def _from_path(name):
try:
from dal.models.scopestree import scopes
return scopes.extract_reference(name)[2]
except KeyError:
# not a path and `scope` wasn't passed
Expand Down Expand Up @@ -228,6 +226,7 @@ def __init__(
print(path[len(self.project_path) + 1 :]) for path in paths
]
else:
from dal.movaidb.database import MovaiDB
self._db = MovaiDB()
self.dry_print = lambda *paths: None

Expand Down Expand Up @@ -1684,6 +1683,7 @@ def __init__(self, force: bool = False, dry: bool = False, **kwargs):
# remove project root dir from it, plus an extra '/' (+1)
self.dry_print = lambda *paths: [print(path) for path in paths]
else:
from dal.movaidb.database import MovaiDB
self._db = MovaiDB()
self.dry_print = lambda *paths: None

Expand Down

0 comments on commit 0f3ab05

Please sign in to comment.