Skip to content

Commit

Permalink
pylint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
boverhof committed Oct 4, 2024
1 parent 30b94d3 commit 76fdaeb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions foqus_lib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ModuleDependencyTracker:

python_modules_available = {}
python_modules_unavailable = {}
module = None
python_module_name = None

@classmethod
def available(cls):
Expand All @@ -59,7 +59,7 @@ def load(cls):
except ModuleNotFoundError:
cls.python_modules_unavailable[instance.python_module_name] = instance
raise
self._module = eval(instance.python_module_name)
instance._module = eval(instance.python_module_name)
cls.python_modules_available[instance.python_module_name] = instance
return instance

Expand Down Expand Up @@ -108,9 +108,9 @@ def load(cls):
if instance is not None:
return instance
instance = cls()
if not os.path.isdir(instance.path()):
if not os.path.isfile(instance.path()):
raise RuntimeError("%r: Failed to Load Dependency" % (instance))
if not os.access(filename, os.X_OK):
if not os.access(instance.path(), os.X_OK):
raise RuntimeError(
"%r: Dependency Path is not Executable: %s" % (instance.path())
)
Expand Down Expand Up @@ -138,7 +138,7 @@ class RScriptDependencyTracker(ExecutableDependencyTracker):
default_path = "C:\\Program Files\\R\\R-3.1.2\\bin\\x64\\Rscript.exe"

@classmethod
def path(self):
def path(cls):
return shutil.which(cls.executable_name) or cls.default_path


Expand Down
2 changes: 2 additions & 0 deletions foqus_lib/foqus.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import sys
import time
import uuid
import traceback
import turbine

# FOQUS imports
import foqus_lib.version.version as ver # foqus version and other info
Expand Down
3 changes: 1 addition & 2 deletions foqus_lib/service/flowsheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"""
import errno
import json
import yaml
import logging
import logging.config
import optparse
Expand All @@ -36,11 +35,11 @@
import urllib.request
import uuid
from os.path import expanduser

import boto3
import botocore.exceptions
import watchtower
import functools
import yaml

from turbine.commands import turbine_simulation_script
from foqus_lib.framework.foqusException.foqusException import *
Expand Down

0 comments on commit 76fdaeb

Please sign in to comment.