Remove pylint from the project

This commit is contained in:
Alexander Hess 2021-01-09 17:47:45 +01:00
parent 100fac659a
commit 9196c88ed4
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
25 changed files with 9 additions and 172 deletions

View file

@ -5,7 +5,7 @@ import urban_meal_delivery as umd
project = umd.__pkg_name__ project = umd.__pkg_name__
author = umd.__author__ author = umd.__author__
copyright = f'2020, {author}' # pylint:disable=redefined-builtin copyright = f'2020, {author}'
version = release = umd.__version__ version = release = umd.__version__
extensions = [ extensions = [

View file

@ -17,7 +17,7 @@ as unified tasks to assure the quality of the source code:
that are then interpreted as the paths the formatters and linters work that are then interpreted as the paths the formatters and linters work
on recursively on recursively
- "lint" (flake8, mypy, pylint): same as "format" - "lint" (flake8, mypy): same as "format"
- "test" (pytest, xdoctest): - "test" (pytest, xdoctest):
@ -141,7 +141,7 @@ def format_(session):
@nox.session(python=PYTHON) @nox.session(python=PYTHON)
def lint(session): def lint(session):
"""Lint source files with flake8, mypy, and pylint. """Lint source files with flake8, and mypy.
If no extra arguments are provided, all source files are linted. If no extra arguments are provided, all source files are linted.
Otherwise, they are interpreted as paths the linters work on recursively. Otherwise, they are interpreted as paths the linters work on recursively.
@ -158,7 +158,6 @@ def lint(session):
'flake8-expression-complexity', 'flake8-expression-complexity',
'flake8-pytest-style', 'flake8-pytest-style',
'mypy', 'mypy',
'pylint',
'wemake-python-styleguide', 'wemake-python-styleguide',
) )
@ -182,18 +181,6 @@ def lint(session):
else: else:
session.log('No paths to be checked with mypy') session.log('No paths to be checked with mypy')
# Ignore errors where pylint cannot import a third-party package due its
# being run in an isolated environment. For the same reason, pylint is
# also not able to determine the correct order of imports.
# One way to fix this is to install all develop dependencies in this nox
# session, which we do not do. The whole point of static linting tools is
# to not rely on any package be importable at runtime. Instead, these
# imports are validated implicitly when the test suite is run.
session.run('pylint', '--version')
session.run(
'pylint', '--disable=import-error', '--disable=wrong-import-order', *locations,
)
@nox.session(python=PYTHON) @nox.session(python=PYTHON)
def test(session): def test(session):

82
poetry.lock generated
View file

@ -83,19 +83,6 @@ python-versions = ">=3.6.1"
[package.extras] [package.extras]
typed = ["typed-ast"] typed = ["typed-ast"]
[[package]]
name = "astroid"
version = "2.4.2"
description = "An abstract syntax tree for Python with inference support."
category = "dev"
optional = false
python-versions = ">=3.5"
[package.dependencies]
lazy-object-proxy = ">=1.4.0,<1.5.0"
six = ">=1.12,<2.0"
wrapt = ">=1.11,<2.0"
[[package]] [[package]]
name = "async-generator" name = "async-generator"
version = "1.10" version = "1.10"
@ -885,14 +872,6 @@ requests = "*"
[package.extras] [package.extras]
test = ["pytest", "requests"] test = ["pytest", "requests"]
[[package]]
name = "lazy-object-proxy"
version = "1.4.3"
description = "A fast and thorough lazy object proxy."
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
[[package]] [[package]]
name = "mako" name = "mako"
version = "1.1.3" version = "1.1.3"
@ -1312,21 +1291,6 @@ category = "main"
optional = false optional = false
python-versions = ">=3.5" python-versions = ">=3.5"
[[package]]
name = "pylint"
version = "2.6.0"
description = "python code static checker"
category = "dev"
optional = false
python-versions = ">=3.5.*"
[package.dependencies]
astroid = ">=2.4.0,<=2.5"
colorama = {version = "*", markers = "sys_platform == \"win32\""}
isort = ">=4.2.5,<6"
mccabe = ">=0.6,<0.7"
toml = ">=0.7.1"
[[package]] [[package]]
name = "pyparsing" name = "pyparsing"
version = "2.4.7" version = "2.4.7"
@ -1869,14 +1833,6 @@ pep8-naming = ">=0.9.1,<0.10.0"
pygments = ">=2.4,<3.0" pygments = ">=2.4,<3.0"
typing_extensions = ">=3.6,<4.0" typing_extensions = ">=3.6,<4.0"
[[package]]
name = "wrapt"
version = "1.12.1"
description = "Module for decorators, wrappers and monkey patching."
category = "dev"
optional = false
python-versions = "*"
[[package]] [[package]]
name = "xdoctest" name = "xdoctest"
version = "0.13.0" version = "0.13.0"
@ -1896,12 +1852,12 @@ optional = ["pygments", "colorama"]
tests = ["pytest", "pytest-cov", "codecov", "scikit-build", "cmake", "ninja", "pybind11"] tests = ["pytest", "pytest-cov", "codecov", "scikit-build", "cmake", "ninja", "pybind11"]
[extras] [extras]
research = ["jupyterlab", "nb_black", "numpy", "pandas", "pytz"] research = ["jupyterlab", "nb_black", "numpy", "pytz"]
[metadata] [metadata]
lock-version = "1.1" lock-version = "1.1"
python-versions = "^3.8" python-versions = "^3.8"
content-hash = "b2671b1aecf282fa648190111c9ca79e7a40b13d0915f59a4f65e7986e737fb5" content-hash = "5c0a4b37e73e0ed607cc2c46a9178f7b8e2a8364856a408a80f955a3c8b861a1"
[metadata.files] [metadata.files]
alabaster = [ alabaster = [
@ -1952,10 +1908,6 @@ astpretty = [
{file = "astpretty-2.0.0-py2.py3-none-any.whl", hash = "sha256:7f27633ed885033da8b58666e7079ffff7e8e01869ec1aa66484cb5185ea3aa4"}, {file = "astpretty-2.0.0-py2.py3-none-any.whl", hash = "sha256:7f27633ed885033da8b58666e7079ffff7e8e01869ec1aa66484cb5185ea3aa4"},
{file = "astpretty-2.0.0.tar.gz", hash = "sha256:e4724bfd753636ba4a84384702e9796e5356969f40af2596d846ce64addde086"}, {file = "astpretty-2.0.0.tar.gz", hash = "sha256:e4724bfd753636ba4a84384702e9796e5356969f40af2596d846ce64addde086"},
] ]
astroid = [
{file = "astroid-2.4.2-py3-none-any.whl", hash = "sha256:bc58d83eb610252fd8de6363e39d4f1d0619c894b0ed24603b881c02e64c7386"},
{file = "astroid-2.4.2.tar.gz", hash = "sha256:2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703"},
]
async-generator = [ async-generator = [
{file = "async_generator-1.10-py3-none-any.whl", hash = "sha256:01c7bf666359b4967d2cda0000cc2e4af16a0ae098cbffcb8472fb9e8ad6585b"}, {file = "async_generator-1.10-py3-none-any.whl", hash = "sha256:01c7bf666359b4967d2cda0000cc2e4af16a0ae098cbffcb8472fb9e8ad6585b"},
{file = "async_generator-1.10.tar.gz", hash = "sha256:6ebb3d106c12920aaae42ccb6f787ef5eefdcdd166ea3d628fa8476abe712144"}, {file = "async_generator-1.10.tar.gz", hash = "sha256:6ebb3d106c12920aaae42ccb6f787ef5eefdcdd166ea3d628fa8476abe712144"},
@ -2282,29 +2234,6 @@ jupyterlab-server = [
{file = "jupyterlab_server-1.2.0-py3-none-any.whl", hash = "sha256:55d256077bf13e5bc9e8fbd5aac51bef82f6315111cec6b712b9a5ededbba924"}, {file = "jupyterlab_server-1.2.0-py3-none-any.whl", hash = "sha256:55d256077bf13e5bc9e8fbd5aac51bef82f6315111cec6b712b9a5ededbba924"},
{file = "jupyterlab_server-1.2.0.tar.gz", hash = "sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c"}, {file = "jupyterlab_server-1.2.0.tar.gz", hash = "sha256:5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c"},
] ]
lazy-object-proxy = [
{file = "lazy-object-proxy-1.4.3.tar.gz", hash = "sha256:f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0"},
{file = "lazy_object_proxy-1.4.3-cp27-cp27m-macosx_10_13_x86_64.whl", hash = "sha256:a2238e9d1bb71a56cd710611a1614d1194dc10a175c1e08d75e1a7bcc250d442"},
{file = "lazy_object_proxy-1.4.3-cp27-cp27m-win32.whl", hash = "sha256:efa1909120ce98bbb3777e8b6f92237f5d5c8ea6758efea36a473e1d38f7d3e4"},
{file = "lazy_object_proxy-1.4.3-cp27-cp27m-win_amd64.whl", hash = "sha256:4677f594e474c91da97f489fea5b7daa17b5517190899cf213697e48d3902f5a"},
{file = "lazy_object_proxy-1.4.3-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:0c4b206227a8097f05c4dbdd323c50edf81f15db3b8dc064d08c62d37e1a504d"},
{file = "lazy_object_proxy-1.4.3-cp34-cp34m-manylinux1_x86_64.whl", hash = "sha256:d945239a5639b3ff35b70a88c5f2f491913eb94871780ebfabb2568bd58afc5a"},
{file = "lazy_object_proxy-1.4.3-cp34-cp34m-win32.whl", hash = "sha256:9651375199045a358eb6741df3e02a651e0330be090b3bc79f6d0de31a80ec3e"},
{file = "lazy_object_proxy-1.4.3-cp34-cp34m-win_amd64.whl", hash = "sha256:eba7011090323c1dadf18b3b689845fd96a61ba0a1dfbd7f24b921398affc357"},
{file = "lazy_object_proxy-1.4.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:48dab84ebd4831077b150572aec802f303117c8cc5c871e182447281ebf3ac50"},
{file = "lazy_object_proxy-1.4.3-cp35-cp35m-win32.whl", hash = "sha256:ca0a928a3ddbc5725be2dd1cf895ec0a254798915fb3a36af0964a0a4149e3db"},
{file = "lazy_object_proxy-1.4.3-cp35-cp35m-win_amd64.whl", hash = "sha256:194d092e6f246b906e8f70884e620e459fc54db3259e60cf69a4d66c3fda3449"},
{file = "lazy_object_proxy-1.4.3-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:97bb5884f6f1cdce0099f86b907aa41c970c3c672ac8b9c8352789e103cf3156"},
{file = "lazy_object_proxy-1.4.3-cp36-cp36m-win32.whl", hash = "sha256:cb2c7c57005a6804ab66f106ceb8482da55f5314b7fcb06551db1edae4ad1531"},
{file = "lazy_object_proxy-1.4.3-cp36-cp36m-win_amd64.whl", hash = "sha256:8d859b89baf8ef7f8bc6b00aa20316483d67f0b1cbf422f5b4dc56701c8f2ffb"},
{file = "lazy_object_proxy-1.4.3-cp37-cp37m-macosx_10_13_x86_64.whl", hash = "sha256:1be7e4c9f96948003609aa6c974ae59830a6baecc5376c25c92d7d697e684c08"},
{file = "lazy_object_proxy-1.4.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:d74bb8693bf9cf75ac3b47a54d716bbb1a92648d5f781fc799347cfc95952383"},
{file = "lazy_object_proxy-1.4.3-cp37-cp37m-win32.whl", hash = "sha256:9b15f3f4c0f35727d3a0fba4b770b3c4ebbb1fa907dbcc046a1d2799f3edd142"},
{file = "lazy_object_proxy-1.4.3-cp37-cp37m-win_amd64.whl", hash = "sha256:9254f4358b9b541e3441b007a0ea0764b9d056afdeafc1a5569eee1cc6c1b9ea"},
{file = "lazy_object_proxy-1.4.3-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:a6ae12d08c0bf9909ce12385803a543bfe99b95fe01e752536a60af2b7797c62"},
{file = "lazy_object_proxy-1.4.3-cp38-cp38-win32.whl", hash = "sha256:5541cada25cd173702dbd99f8e22434105456314462326f06dba3e180f203dfd"},
{file = "lazy_object_proxy-1.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:59f79fef100b09564bc2df42ea2d8d21a64fdcda64979c0fa3db7bdaabaf6239"},
]
mako = [ mako = [
{file = "Mako-1.1.3-py2.py3-none-any.whl", hash = "sha256:93729a258e4ff0747c876bd9e20df1b9758028946e976324ccd2d68245c7b6a9"}, {file = "Mako-1.1.3-py2.py3-none-any.whl", hash = "sha256:93729a258e4ff0747c876bd9e20df1b9758028946e976324ccd2d68245c7b6a9"},
{file = "Mako-1.1.3.tar.gz", hash = "sha256:8195c8c1400ceb53496064314c6736719c6f25e7479cd24c77be3d9361cddc27"}, {file = "Mako-1.1.3.tar.gz", hash = "sha256:8195c8c1400ceb53496064314c6736719c6f25e7479cd24c77be3d9361cddc27"},
@ -2557,10 +2486,6 @@ pygments = [
{file = "Pygments-2.7.3-py3-none-any.whl", hash = "sha256:f275b6c0909e5dafd2d6269a656aa90fa58ebf4a74f8fcf9053195d226b24a08"}, {file = "Pygments-2.7.3-py3-none-any.whl", hash = "sha256:f275b6c0909e5dafd2d6269a656aa90fa58ebf4a74f8fcf9053195d226b24a08"},
{file = "Pygments-2.7.3.tar.gz", hash = "sha256:ccf3acacf3782cbed4a989426012f1c535c9a90d3a7fc3f16d231b9372d2b716"}, {file = "Pygments-2.7.3.tar.gz", hash = "sha256:ccf3acacf3782cbed4a989426012f1c535c9a90d3a7fc3f16d231b9372d2b716"},
] ]
pylint = [
{file = "pylint-2.6.0-py3-none-any.whl", hash = "sha256:bfe68f020f8a0fece830a22dd4d5dddb4ecc6137db04face4c3420a46a52239f"},
{file = "pylint-2.6.0.tar.gz", hash = "sha256:bb4a908c9dadbc3aac18860550e870f58e1a02c9f2c204fdf5693d73be061210"},
]
pyparsing = [ pyparsing = [
{file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"},
{file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"},
@ -2961,9 +2886,6 @@ wemake-python-styleguide = [
{file = "wemake-python-styleguide-0.14.1.tar.gz", hash = "sha256:e13dc580fa56b7b548de8da170bccb8ddff2d4ab026ca987db8a9893bf8a7b5b"}, {file = "wemake-python-styleguide-0.14.1.tar.gz", hash = "sha256:e13dc580fa56b7b548de8da170bccb8ddff2d4ab026ca987db8a9893bf8a7b5b"},
{file = "wemake_python_styleguide-0.14.1-py3-none-any.whl", hash = "sha256:73a501e0547275287a2b926515c000cc25026a8bceb9dcc1bf73ef85a223a3c6"}, {file = "wemake_python_styleguide-0.14.1-py3-none-any.whl", hash = "sha256:73a501e0547275287a2b926515c000cc25026a8bceb9dcc1bf73ef85a223a3c6"},
] ]
wrapt = [
{file = "wrapt-1.12.1.tar.gz", hash = "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7"},
]
xdoctest = [ xdoctest = [
{file = "xdoctest-0.13.0-py2.py3-none-any.whl", hash = "sha256:de861fd5230a46bd26c054b4981169dd963f813768cb62b62e104e4d2644ac94"}, {file = "xdoctest-0.13.0-py2.py3-none-any.whl", hash = "sha256:de861fd5230a46bd26c054b4981169dd963f813768cb62b62e104e4d2644ac94"},
{file = "xdoctest-0.13.0.tar.gz", hash = "sha256:4f113a430076561a9d7f31af65b5d5acda62ee06b05cb6894264cb9efb8196ac"}, {file = "xdoctest-0.13.0.tar.gz", hash = "sha256:4f113a430076561a9d7f31af65b5d5acda62ee06b05cb6894264cb9efb8196ac"},

View file

@ -68,7 +68,6 @@ flake8-black = "^0.2.1"
flake8-expression-complexity = "^0.0.8" flake8-expression-complexity = "^0.0.8"
flake8-pytest-style = "^1.2.2" flake8-pytest-style = "^1.2.2"
mypy = "^0.782" mypy = "^0.782"
pylint = "^2.5.3"
wemake-python-styleguide = "^0.14.1" # flake8 plug-in wemake-python-styleguide = "^0.14.1" # flake8 plug-in
# Test Suite # Test Suite

View file

@ -261,45 +261,6 @@ ignore_missing_imports = true
ignore_missing_imports = true ignore_missing_imports = true
[pylint.FORMAT]
# Comply with black's style.
max-line-length = 88
[pylint.MESSAGES CONTROL]
disable =
# We use TODO's to indicate locations in the source base
# that must be worked on in the near future.
fixme,
# Too many false positives and cannot be disabled within a file.
# Source: https://github.com/PyCQA/pylint/issues/214
duplicate-code,
# Comply with black's style.
bad-continuation, bad-whitespace,
# =====================
# flake8 de-duplication
# Source: https://pylint.pycqa.org/en/latest/faq.html#i-am-using-another-popular-linter-alongside-pylint-which-messages-should-i-disable-to-avoid-duplicates
# =====================
# mccabe
too-many-branches,
# pep8-naming
bad-classmethod-argument, bad-mcs-classmethod-argument,
invalid-name, no-self-argument,
# pycodestyle
bad-indentation, bare-except, line-too-long, missing-final-newline,
multiple-statements, trailing-whitespace, unnecessary-semicolon, unneeded-not,
# pydocstyle
missing-class-docstring, missing-function-docstring, missing-module-docstring,
# pyflakes
undefined-variable, unused-import, unused-variable,
# wemake-python-styleguide
redefined-outer-name,
# A lot of classes in the test suite and `Meta` classes cause complaints.
too-few-public-methods,
[pylint.REPORTS]
score = no
[tool:pytest] [tool:pytest]
addopts = addopts =
--strict-markers --strict-markers

View file

@ -68,8 +68,7 @@ class Address(meta.Base):
pixels = orm.relationship('AddressPixelAssociation', back_populates='address') pixels = orm.relationship('AddressPixelAssociation', back_populates='address')
# We do not implement a `.__init__()` method and leave that to SQLAlchemy. # We do not implement a `.__init__()` method and leave that to SQLAlchemy.
# Instead, we use `hasattr()` to check for uninitialized attributes. # Instead, we use `hasattr()` to check for uninitialized attributes. grep:b1f68d24
# grep:b1f68d24 pylint:disable=attribute-defined-outside-init
def __repr__(self) -> str: def __repr__(self) -> str:
"""Non-literal text representation.""" """Non-literal text representation."""

View file

@ -1,6 +1,5 @@
"""Provide the ORM's `City` model.""" """Provide the ORM's `City` model."""
import sqlalchemy as sa import sqlalchemy as sa
from sqlalchemy import orm from sqlalchemy import orm
from sqlalchemy.dialects import postgresql from sqlalchemy.dialects import postgresql
@ -35,8 +34,7 @@ class City(meta.Base):
grids = orm.relationship('Grid', back_populates='city') grids = orm.relationship('Grid', back_populates='city')
# We do not implement a `.__init__()` method and leave that to SQLAlchemy. # We do not implement a `.__init__()` method and leave that to SQLAlchemy.
# Instead, we use `hasattr()` to check for uninitialized attributes. # Instead, we use `hasattr()` to check for uninitialized attributes. grep:d334120e
# grep:d334120e pylint:disable=attribute-defined-outside-init
def __repr__(self) -> str: def __repr__(self) -> str:
"""Non-literal text representation.""" """Non-literal text representation."""

View file

@ -24,8 +24,6 @@ class Location:
https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system
""" """
# pylint:disable=too-many-instance-attributes
def __init__(self, latitude: float, longitude: float) -> None: def __init__(self, latitude: float, longitude: float) -> None:
"""Create a location from a WGS84-conforming `latitude`-`longitude` pair.""" """Create a location from a WGS84-conforming `latitude`-`longitude` pair."""
# The SQLAlchemy columns come as `Decimal`s due to the `DOUBLE_PRECISION`. # The SQLAlchemy columns come as `Decimal`s due to the `DOUBLE_PRECISION`.

View file

@ -18,8 +18,6 @@ class TestShowVersion:
" (development)" to the output. " (development)" to the output.
""" """
# pylint:disable=no-self-use
@pytest.fixture @pytest.fixture
def ctx(self) -> click.Context: def ctx(self) -> click.Context:
"""Context around the `main.entry_point` Command.""" """Context around the `main.entry_point` Command."""
@ -65,8 +63,6 @@ class TestCLIWithoutCommand:
Therefore, they are not considered for coverage reporting. Therefore, they are not considered for coverage reporting.
""" """
# pylint:disable=no-self-use
@pytest.mark.no_cover @pytest.mark.no_cover
def test_no_options(self, cli): def test_no_options(self, cli):
"""Exit with 0 status code and no output if run without options.""" """Exit with 0 status code and no output if run without options."""

View file

@ -121,8 +121,6 @@ class AdHocOrderFactory(alchemy.SQLAlchemyModelFactory):
flags to adapt how the `Order` is created. flags to adapt how the `Order` is created.
""" """
# pylint:disable=too-many-instance-attributes
class Meta: class Meta:
model = db.Order model = db.Order
sqlalchemy_get_or_create = ('id',) sqlalchemy_get_or_create = ('id',)
@ -282,7 +280,7 @@ class AdHocOrderFactory(alchemy.SQLAlchemyModelFactory):
) )
@factory.post_generation @factory.post_generation
def post( # noqa:C901,WPS23 pylint:disable=unused-argument def post( # noqa:C901,WPS231
obj, create, extracted, **kwargs, # noqa:B902,N805 obj, create, extracted, **kwargs, # noqa:B902,N805
): ):
"""Discard timestamps that occur after cancellation.""" """Discard timestamps that occur after cancellation."""

View file

@ -1,5 +1,4 @@
"""Test the ORM's `Address` model.""" """Test the ORM's `Address` model."""
# pylint:disable=no-self-use,protected-access
import pytest import pytest
import sqlalchemy as sqla import sqlalchemy as sqla

View file

@ -8,7 +8,6 @@ Implementation notes:
code associated with it. Therefore, we test it here as non-e2e tests and do code associated with it. Therefore, we test it here as non-e2e tests and do
not measure its coverage. not measure its coverage.
""" """
# pylint:disable=no-self-use
import pytest import pytest
import sqlalchemy as sqla import sqlalchemy as sqla

View file

@ -1,5 +1,4 @@
"""Test the ORM's `City` model.""" """Test the ORM's `City` model."""
# pylint:disable=no-self-use
import pytest import pytest

View file

@ -1,5 +1,4 @@
"""Test the ORM's `Courier` model.""" """Test the ORM's `Courier` model."""
# pylint:disable=no-self-use
import pytest import pytest
from sqlalchemy import exc as sa_exc from sqlalchemy import exc as sa_exc

View file

@ -1,5 +1,4 @@
"""Test the ORM's `Customer` model.""" """Test the ORM's `Customer` model."""
# pylint:disable=no-self-use
import pytest import pytest

View file

@ -1,5 +1,4 @@
"""Test the ORM's `Forecast` model.""" """Test the ORM's `Forecast` model."""
# pylint:disable=no-self-use
import datetime import datetime

View file

@ -1,5 +1,4 @@
"""Test the ORM's `Grid` model.""" """Test the ORM's `Grid` model."""
# pylint:disable=no-self-use
import pytest import pytest
import sqlalchemy as sqla import sqlalchemy as sqla

View file

@ -1,5 +1,4 @@
"""Test the ORM's `Order` model.""" """Test the ORM's `Order` model."""
# pylint:disable=no-self-use,protected-access
import datetime import datetime
import random import random
@ -49,8 +48,6 @@ class TestProperties:
and provided by the `make_order` fixture. and provided by the `make_order` fixture.
""" """
# pylint:disable=no-self-use,too-many-public-methods
def test_is_ad_hoc(self, order): def test_is_ad_hoc(self, order):
"""Test `Order.scheduled` property.""" """Test `Order.scheduled` property."""
assert order.ad_hoc is True assert order.ad_hoc is True

View file

@ -1,5 +1,4 @@
"""Test the ORM's `Pixel` model.""" """Test the ORM's `Pixel` model."""
# pylint:disable=no-self-use
import pytest import pytest
import sqlalchemy as sqla import sqlalchemy as sqla

View file

@ -1,5 +1,4 @@
"""Test the ORM's `Restaurant` model.""" """Test the ORM's `Restaurant` model."""
# pylint:disable=no-self-use
import pytest import pytest
import sqlalchemy as sqla import sqlalchemy as sqla

View file

@ -1,5 +1,4 @@
"""Test the `Location` class.""" """Test the `Location` class."""
# pylint:disable=no-self-use
import pytest import pytest
@ -97,7 +96,6 @@ class TestSpecialMethods:
def test_compare_utm_coordinates_to_themselves(self, location): def test_compare_utm_coordinates_to_themselves(self, location):
"""Test `Location.__eq__()`.""" """Test `Location.__eq__()`."""
# pylint:disable=comparison-with-itself
result = location == location # noqa:WPS312 result = location == location # noqa:WPS312
assert result is True assert result is True

View file

@ -1,5 +1,4 @@
"""Test the `OrderHistory.aggregate_orders()` method.""" """Test the `OrderHistory.aggregate_orders()` method."""
# pylint:disable=no-self-use,unused-argument
import datetime import datetime

View file

@ -3,7 +3,6 @@
Unless otherwise noted, each `time_step` is 60 minutes long implying Unless otherwise noted, each `time_step` is 60 minutes long implying
12 time steps per day (i.e., we use `LONG_TIME_STEP` by default). 12 time steps per day (i.e., we use `LONG_TIME_STEP` by default).
""" """
# pylint:disable=no-self-use,unused-argument
import datetime import datetime
@ -54,7 +53,7 @@ def order_totals(good_pixel_id):
def order_history(order_totals, grid): def order_history(order_totals, grid):
"""An `OrderHistory` object that does not need the database.""" """An `OrderHistory` object that does not need the database."""
oh = timify.OrderHistory(grid=grid, time_step=test_config.LONG_TIME_STEP) oh = timify.OrderHistory(grid=grid, time_step=test_config.LONG_TIME_STEP)
oh._data = order_totals # pylint:disable=protected-access oh._data = order_totals
return oh return oh

View file

@ -1,5 +1,4 @@
"""Test the basic functionalities in the `OrderHistory` class.""" """Test the basic functionalities in the `OrderHistory` class."""
# pylint:disable=no-self-use
import pytest import pytest

View file

@ -20,8 +20,6 @@ import urban_meal_delivery
class TestPEP404Compliance: class TestPEP404Compliance:
"""Packaged version identifier is PEP440 compliant.""" """Packaged version identifier is PEP440 compliant."""
# pylint:disable=no-self-use
@pytest.fixture @pytest.fixture
def parsed_version(self) -> str: def parsed_version(self) -> str:
"""The packaged version.""" """The packaged version."""
@ -47,8 +45,6 @@ class TestPEP404Compliance:
class TestSemanticVersioning: class TestSemanticVersioning:
"""Packaged version follows a strict subset of semantic versioning.""" """Packaged version follows a strict subset of semantic versioning."""
# pylint:disable=no-self-use
version_pattern = re.compile( version_pattern = re.compile(
r'^(0|([1-9]\d*))\.(0|([1-9]\d*))\.(0|([1-9]\d*))(\.dev(0|([1-9]\d*)))?$', r'^(0|([1-9]\d*))\.(0|([1-9]\d*))\.(0|([1-9]\d*))(\.dev(0|([1-9]\d*)))?$',
) )