Minor linting improvements

I have now disabled W1203 globally, see comment in
pyproject.toml
This commit is contained in:
Richard Bowman 2021-04-27 11:17:11 +01:00
parent 90f5a755b1
commit a2ba95c1d3
4 changed files with 11 additions and 7 deletions

View file

@ -1,11 +1,8 @@
import logging
from typing import List, Tuple
from labthings import fields, find_component
from labthings.views import ActionView
from openflexure_microscope.utilities import axes_to_array
class MoveStageAPI(ActionView):
args = {

View file

@ -4,7 +4,7 @@ import logging
import sys
import time
from contextlib import contextmanager
from typing import Dict, List, Optional, Tuple, Type, Union, Sequence
from typing import Dict, List, Optional, Sequence, Tuple, Type, Union
import numpy as np

View file

@ -25,7 +25,13 @@ ensure_newline_before_comments = true
line_length = 88
[tool.pylint.'MESSAGES CONTROL']
disable = "fixme,C,R"
# W1203 warns about using f strings in logging statements.
# I'm really not concerned about the performance implications of this,
# particularly as we often have the log level set quite high. I think
# for our current purposes, using f strings in logging statements is
# more readable and thus a good idea in many places - I've disabled
# this warning code globally for that reason.
disable = "fixme,C,R,W1203"
max-line-length = 88
[tool.poe.executor]

View file

@ -6,10 +6,11 @@ https://packaging.python.org/guides/distributing-packages-using-setuptools/
"""
# the following imports, from the guide above, prefer `setuptools` to `distutils`
from setuptools import setup, find_packages
from os import path
# the following imports, from the guide above, prefer `setuptools` to `distutils`
from setuptools import find_packages, setup
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file