Commit 3bf9f232 authored by Leon Riesebos's avatar Leon Riesebos
Browse files

refactored typing ignores

parent d6cdeaf2
Pipeline #338065735 failed with stage
in 2 minutes and 51 seconds
import logging
import serial # type: ignore
import serial
import typing
logger = logging.getLogger(__name__)
......
......@@ -48,7 +48,7 @@ class LD391Driver:
if self._simulation:
_logger.info(message)
else:
self._conn.write(message) # type: ignore
self._conn.write(message)
def _query(self, message: str, simulation_value):
"""Wrapper code for query functionality to take into account simulations."""
......@@ -56,7 +56,7 @@ class LD391Driver:
_logger.info(message)
return simulation_value
else:
return self._conn.query(message) # type: ignore
return self._conn.query(message)
def flush(self):
"""Flush pyvisa buffer."""
......
import serial # type: ignore
import serial
import logging
import typing
......
......@@ -221,7 +221,7 @@ class PaladinLogger(RecurringTaskBase):
def _write_log(self) -> None:
""" write current laser parameter into influx DB """
self._influx.write_point_monitoring(**self._influx_tags, **self._laser_parameters) # type: ignore
self._influx.write_point_monitoring(**self._influx_tags, **self._laser_parameters)
# remove error key once it is recorded.
self._laser_parameters.pop(self.ERROR_CODE_KEY, None)
......
......@@ -12,7 +12,7 @@ import datetime
import time
import os
import os.path
import serial # type: ignore
import serial
import dax_comtools.util.args
......
......@@ -15,8 +15,8 @@ import logging
import typing
import time
import pymoku # type: ignore
import pymoku.instruments # type: ignore
import pymoku
import pymoku.instruments
import dax_comtools.util.influx_db
import dax_comtools.util.args
......
......@@ -30,7 +30,7 @@ def patch_instrument_path() -> None:
logger.debug(f'Expanded instrument path: {instrument_path}')
# Find the data folder
import pymoku # type: ignore
import pymoku
data_folder = os.path.join(os.path.dirname(pymoku.__file__), 'data')
logger.debug(f'pymoku data folder: {data_folder}')
......
......@@ -60,7 +60,7 @@ show_error_context = True
show_error_codes = True
warn_unused_ignores = True
[mypy-sipyco.*,influxdb.*,pyvisa.*]
[mypy-sipyco.*,influxdb.*,pyvisa.*,serial.*,pymoku.*]
ignore_missing_imports = True
[coverage:run]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment