How to use the importlab.environment.Environment function in importlab

To help you get started, we’ve selected a few importlab examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github google / importlab / tests / test_graph.py View on Github external
def setUp(self):
        self.tempdir = utils.Tempdir()
        self.tempdir.setup()
        self.filenames = [
            self.tempdir.create_file(f, FILES[f])
            for f in FILES]
        self.fs = fs.OSFileSystem(self.tempdir.path)
        self.env = environment.Environment(fs.Path([self.fs]), (3, 6))
github google / importlab / tests / test_output.py View on Github external
def setUp(self):
        self.tempdir = utils.Tempdir()
        self.tempdir.setup()
        filenames = [
            self.tempdir.create_file(f, FILES[f])
            for f in FILES]
        self.fs = fs.OSFileSystem(self.tempdir.path)
        env = environment.Environment(fs.Path([self.fs]), (3, 6))
        self.graph = graph.ImportGraph.create(env, filenames)
github google / importlab / tests / test_graph.py View on Github external
def setUp(self):
        self.tempdir = utils.Tempdir()
        self.tempdir.setup()
        self.filenames = [
            self.tempdir.create_file(f, FILES[f])
            for f in FILES]
        self.fs = fs.OSFileSystem(self.tempdir.path)
        self.env = environment.Environment(fs.Path([self.fs]), (3, 6))
github google / importlab / importlab / environment.py View on Github external
def create_from_args(args):
    python_version_string = args.python_version
    python_version = utils.split_version(python_version_string)
    path = path_from_pythonpath(args.pythonpath)
    return Environment(path, python_version)