Skip to content

Commit

Permalink
Merge pull request #109 from JdeRobot/issue-108
Browse files Browse the repository at this point in the history
Remove ompl E1101 error inside functions
  • Loading branch information
ango1994 authored Dec 14, 2023
2 parents 640bad9 + 85c5fa4 commit a3b0b2c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions manager/manager/lint/linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ def evaluate_code(self, code, warnings=False):
open("user_code.py", "r")

command = ""
output = subprocess.check_output(['bash', '-c', 'echo $ROS_VERSION'])
output = subprocess.check_output(
['bash', '-c', 'echo $ROS_VERSION'])
output_str = output.decode('utf-8')
version = int(output_str[0])
if (version == 2):
if (version == 2):
command = "export PYTHONPATH=$PYTHONPATH:/$EXERCISE_FOLDER/python_template/ros2_humble; python3 RoboticsAcademy/src/manager/manager/lint/pylint_checker.py"
else:
command = "export PYTHONPATH=$PYTHONPATH:/$EXERCISE_FOLDER/python_template/ros1_noetic; python3 RoboticsAcademy/src/manager/manager/lint/pylint_checker.py"
Expand Down Expand Up @@ -68,7 +69,8 @@ def evaluate_code(self, code, warnings=False):
result[eof_exception.end():]

# Removes ompl E1101 error
ompl_error = re.search(r":[0-9]+: error \(E1101, no-member, \) Module 'ompl.*\n", result)
ompl_error = re.search(
r":[0-9]+: error \(E1101, no-member, .*\) Module 'ompl.*\n", result)
if (ompl_error != None):
result = result[:ompl_error.start()] + \
result[ompl_error.end():]
Expand Down

0 comments on commit a3b0b2c

Please sign in to comment.