Skip to content

Commit

Permalink
Fix new flake8 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ataffanel committed Oct 30, 2019
1 parent 47b0382 commit 02181db
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/cfclient/ui/tabs/QualisysTab.py
Expand Up @@ -253,7 +253,7 @@ def __init__(self, tabWidget, helper, *args):

try:
self.flight_paths = Config().get("flight_paths")
except Exception as err:
except Exception:
logger.debug("No flight config")
self.flight_paths = self.default_flight_paths

Expand Down Expand Up @@ -725,7 +725,7 @@ def set_path_mode(self):
# temp_position = []
temp = self.model.item(y, x)

except Exception as err:
except Exception:
reading_data = False
# remove the last "," element
list = list[:(len(list) - 1)]
Expand Down Expand Up @@ -896,7 +896,7 @@ def on_packet(self, packet):
pitch=temp_cf_pos[1][1],
yaw=temp_cf_pos[1][0])

except ValueError as err:
except ValueError:
self.qtmStatus = ' : connected : No 6DoF body found'

try:
Expand All @@ -909,7 +909,7 @@ def on_packet(self, packet):
pitch=temp_wand_pos[1][1],
yaw=temp_wand_pos[1][0])

except ValueError as err:
except ValueError:
self.qtmStatus = ' : connected : No 6DoF body found'

if self._cf is not None and self.cf_pos.is_valid():
Expand Down
6 changes: 3 additions & 3 deletions src/cfclient/utils/input/__init__.py
Expand Up @@ -117,7 +117,7 @@ def __init__(self, do_device_discovery=True):

self._input_map = None

if Config().get("flightmode") is "Normal":
if Config().get("flightmode") == "Normal":
self.max_yaw_rate = Config().get("normal_max_yaw")
self.max_rp_angle = Config().get("normal_max_rp")
# Values are stored at %, so use the functions to set the values
Expand Down Expand Up @@ -386,8 +386,8 @@ def read_input(self):
d.limit_rp = True
if self._assisted_control == \
JoystickReader.ASSISTED_CONTROL_ALTHOLD:
self.assisted_control_updated.call(
data.assistedControl)
self.assisted_control_updated.call(
data.assistedControl)
if ((self._assisted_control ==
JoystickReader.ASSISTED_CONTROL_HEIGHTHOLD) or
(self._assisted_control ==
Expand Down
4 changes: 2 additions & 2 deletions src/cfclient/utils/input/inputinterfaces/wiimote.py
Expand Up @@ -24,7 +24,7 @@ class _Reader(object):

def devices(self):
"""List all the available connections"""
raise NotImplemented()
raise NotImplementedError

def open(self, device_id):
"""
Expand All @@ -38,7 +38,7 @@ def close(self, device_id):

def read(self, device_id):
"""Read input from the selected device."""
raise NotImplemented()
raise NotImplementedError


TWO = 1
Expand Down

0 comments on commit 02181db

Please sign in to comment.