Skip to content

Commit 02181db

Browse files
committed
Fix new flake8 issues
1 parent 47b0382 commit 02181db

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/cfclient/ui/tabs/QualisysTab.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def __init__(self, tabWidget, helper, *args):
253253

254254
try:
255255
self.flight_paths = Config().get("flight_paths")
256-
except Exception as err:
256+
except Exception:
257257
logger.debug("No flight config")
258258
self.flight_paths = self.default_flight_paths
259259

@@ -725,7 +725,7 @@ def set_path_mode(self):
725725
# temp_position = []
726726
temp = self.model.item(y, x)
727727

728-
except Exception as err:
728+
except Exception:
729729
reading_data = False
730730
# remove the last "," element
731731
list = list[:(len(list) - 1)]
@@ -896,7 +896,7 @@ def on_packet(self, packet):
896896
pitch=temp_cf_pos[1][1],
897897
yaw=temp_cf_pos[1][0])
898898

899-
except ValueError as err:
899+
except ValueError:
900900
self.qtmStatus = ' : connected : No 6DoF body found'
901901

902902
try:
@@ -909,7 +909,7 @@ def on_packet(self, packet):
909909
pitch=temp_wand_pos[1][1],
910910
yaw=temp_wand_pos[1][0])
911911

912-
except ValueError as err:
912+
except ValueError:
913913
self.qtmStatus = ' : connected : No 6DoF body found'
914914

915915
if self._cf is not None and self.cf_pos.is_valid():

src/cfclient/utils/input/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def __init__(self, do_device_discovery=True):
117117

118118
self._input_map = None
119119

120-
if Config().get("flightmode") is "Normal":
120+
if Config().get("flightmode") == "Normal":
121121
self.max_yaw_rate = Config().get("normal_max_yaw")
122122
self.max_rp_angle = Config().get("normal_max_rp")
123123
# Values are stored at %, so use the functions to set the values
@@ -386,8 +386,8 @@ def read_input(self):
386386
d.limit_rp = True
387387
if self._assisted_control == \
388388
JoystickReader.ASSISTED_CONTROL_ALTHOLD:
389-
self.assisted_control_updated.call(
390-
data.assistedControl)
389+
self.assisted_control_updated.call(
390+
data.assistedControl)
391391
if ((self._assisted_control ==
392392
JoystickReader.ASSISTED_CONTROL_HEIGHTHOLD) or
393393
(self._assisted_control ==

src/cfclient/utils/input/inputinterfaces/wiimote.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class _Reader(object):
2424

2525
def devices(self):
2626
"""List all the available connections"""
27-
raise NotImplemented()
27+
raise NotImplementedError
2828

2929
def open(self, device_id):
3030
"""
@@ -38,7 +38,7 @@ def close(self, device_id):
3838

3939
def read(self, device_id):
4040
"""Read input from the selected device."""
41-
raise NotImplemented()
41+
raise NotImplementedError
4242

4343

4444
TWO = 1

0 commit comments

Comments
 (0)