blob: 6bd56d7ab542ad5ad3ac14d66126e23746af3135 [file] [log] [blame]
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
[GLOBAL]
pants_version: 1.15.0
plugins: [
'pantsbuild.pants.contrib.python.checks==%(pants_version)s',
]
backend_packages: [
# Pants built-ins:
'pants.backend.codegen.thrift.python',
'pants.backend.graph_info',
'pants.backend.project_info',
'pants.backend.python',
]
# allow imports in BUILD files to read .auroraversion
build_file_imports: allow
[thrift]
version: 0.10.0
[python-setup]
interpreter_constraints: CPython>=2.7,<3
[test.pytest]
# AURORA-1972: As a workaround for spuriously failing tests, test different
# targets in isolation
fast: False
[pytest]
# FIXME: Workaround for https://github.com/pytest-dev/pytest/issues/4770
# Can be dropped once we upgrade to pants 1.14.0
requirements: pytest==3.0.7
# We have some modules that have side-effects upon import, including starting a repl, so we can't
# use python-eval to validate our BUILD deps currently.
[lint.python-eval]
skip: True
# We use isort for this.
[pycheck-import-order]
skip: True
[pycheck-pycodestyle]
# Code reference is here: http://pep8.readthedocs.org/en/latest/intro.html#error-codes
ignore: [
# Aurora custom ignores:
'E114', # indentation is not a multiple of four (comment)
'E116', # unexpected indentation (comment)
'E122', # continuation line missing indentation or outdented
'E126', # continuation line over-indented for hanging indent
'E129', # visually indented line with same indent as next logical line
'E131', # continuation line unaligned for hanging indent
'E306', # blank line before a nested definition
'E731', # do not assign a lambda expression, use a def
'W503', # line break before binary operator
'W504', # line break after binary operator
# These are a subset of the standard ignores pre-packaged for pycheck-pep8/pep8, but we need to
# repeat here since we add our own above:
'E111', # indentation is not a multiple of four
'E121', # continuation line under-indented for hanging indent
'E125', # continuation line with same indent as next logical line
'E127', # continuation line over-indented for visual indent
'E128', # continuation line under-indented for visual indent
'E301', # expected 1 blank line, found 0 # We allow consecutive exception declarations.
'E401', # multiple imports on one line
'E701', # multiple statements on one line (colon) # We allow: `class Exc(Exception): pass`.
]
# We disable the class factoring check since it flags calls to superclass constructors from nested
# classes. We do this commonly enough in nested exception classes.
# The error looks like so:
# T800 Instead of Context.CommandError use self.CommandError or cls.CommandError with
# instancemethods and classmethods respectively.
[pycheck-class-factoring]
skip: True