Repository: open-dynamic-robot-initiative/trifinger_simulation (language: python)

Issue:
Add flake8 to GitHub Actions for pull requests
## Description
- Merge lint.yml and style_checker.yml
- Add flake8 check
- Add problem matchers for flake8 and mypy (to get annotations)


## How I Tested

Will be tested via this PR.



Discussion / hints:

Fix patch:
diff --git a/docs/conf.py b/docs/conf.py
index 0650e200..45830be8 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,8 +1,8 @@
 #!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 #
-# pyBullet Simulation for Finger Robots documentation build configuration file, created by
-# sphinx-quickstart on Tue Jun 30 15:32:33 2020.
+# pyBullet Simulation for Finger Robots documentation build configuration file,
+# created by sphinx-quickstart on Tue Jun 30 15:32:33 2020.
 #
 # This file is execfile()d with the current directory set to its
 # containing dir.
@@ -19,6 +19,7 @@
 #
 import os
 import sys
+import sphinx_rtd_theme  # noqa
 
 sys.path.insert(0, os.path.abspath("../python/"))
 
@@ -32,7 +33,6 @@
 # Add any Sphinx extension module names here, as strings. They can be
 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
 # ones.
-import sphinx_rtd_theme
 
 extensions = [
     "sphinx_rtd_theme",


Test patch:
diff --git a/tests/test_camera.py b/tests/test_camera.py
index 0024ab11..75daa217 100644
--- a/tests/test_camera.py
+++ b/tests/test_camera.py
@@ -1,7 +1,6 @@
 """Unit tests for the camera module."""
 import os
 import pathlib
-import pytest
 import numpy as np
 import pybullet
 
diff --git a/tests/test_tasks_move_cube_on_trajectory.py b/tests/test_tasks_move_cube_on_trajectory.py
index 0d57d90a..54d4bce6 100644
--- a/tests/test_tasks_move_cube_on_trajectory.py
+++ b/tests/test_tasks_move_cube_on_trajectory.py
@@ -203,7 +203,7 @@ def test_json_goal_from_config_no_goal(test_data_dir):
         traj_json = mct.json_goal_from_config(test_data_dir / "no_goal.json")
         traj = json.loads(traj_json)
         mct.validate_goal(traj)
-    except Exception as e:
+    except Exception:
         pytest.fail()
 
 
diff --git a/tests/test_tasks_rearrange_dice.py b/tests/test_tasks_rearrange_dice.py
index 2b2ab282..50ef1d2c 100644
--- a/tests/test_tasks_rearrange_dice.py
+++ b/tests/test_tasks_rearrange_dice.py
@@ -145,7 +145,7 @@ def test_json_goal_from_config_no_goal(test_data_dir):
         goal_json = task.json_goal_from_config(test_data_dir / "no_goal.json")
         goal = json.loads(goal_json)
         task.validate_goal(goal)
-    except Exception as e:
+    except Exception:
         pytest.fail()