This repository has been archived by the owner on Jun 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.cfg
122 lines (111 loc) · 4.77 KB
/
setup.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
[bumpversion]
current_version = 0.1.0
commit = True
tag = True
[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'
[bumpversion:file:scarlett_os/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'
[wheel]
universal = 1
[bdist_wheel]
universal = 1
[flake8]
# it's not a bug that we aren't using all of hacking, ignore:
# F812: list comprehension redefines ...
# H101: Use TODO(NAME)
# H202: assertRaises Exception too broad
# H233: Python 3.x incompatible use of print operator
# H301: one import per line
# H306: imports not in alphabetical order (time, os)
# H401: docstring should not start with a space
# H403: multi line docstrings should end on a new line
# H404: multi line docstring should start without a leading new line
# H405: multi line docstring summary not separated with an empty line
# H501: Do not use self.__dict__ for string formatting
# F401: imported but unused
# W604 backticks are deprecated, use 'repr()'
# F811 redefinition of unused 'mocker' from line 13
# F841 local variable 'mock_datadog_initialize' is assigned to but never used
ignore = F812,H101,H202,H233,H301,H306,H401,H403,H404,H405,H501,F401,W604,F811,F841,E302,E401,E501,E265,E713,E402,D204,D102,D400,D205,D202,D103,D209,D105,D101,D401,D200,E127,D100
exclude =
# No need to traverse our git directory
.git,
# There's no value in checking cache directories
__pycache__,
# The conf file is mostly autogenerated, ignore it
docs/source/conf.py,
# The old directory contains Flake8 2.0
old,
# This contains our built documentation
build,
# This contains builds of flake8 that we don't want to check
dist,
.svn,
CVS,
.bzr,
.hg,
.tox,
docs,
virtualenv_run,
tests/*
max-line-length = 200
# max-complexity: which will emit a warning if the McCabe complexity of a function is higher than the value. By default it’s deactivated.
max-complexity = 12
[tool:pytest]
timeout = 60
testpaths = tests
norecursedirs = .git testing_config
# --cov-append
addopts = --cov-append --cov=scarlett_os --cov-report term-missing --cov-report xml:cov.xml --cov-report html:htmlcov --cov-report annotate:cov_annotate
####################################################################################
# source: https://github.com/pytest-dev/pytest-mock
# Python 3 users might want to use a newest version of the mock package as
# published on PyPI than the one that comes with the Python distribution.
# This will force the plugin to import mock instead of the unittest.mock
# module bundled with Python 3.3+. Note that this option is only used in
# Python 3+, as Python 2 users only have the option to use the mock package from PyPI anyway.
mock_use_standalone_module = False
# FOLLOW UP INFO. It's possible that we want to be using unittest.mock instead of
# mock available from pypi which seems to have regressions
# via: https://github.com/pytest-dev/pytest-mock/blob/9d221d5bc53dd0cfddbe775a1595f72d029b9ece/CHANGELOG.rst
# New configuration variable, mock_use_standalone_module (defaults to False).
# This forces the plugin to import mock instead of unittest.mock on Python 3.
# This is useful to import a newer version than the one available in the Python distribution.
#
# Previously the plugin would first try to import mock and fallback to unittest.mock
# in case of an ImportError, but this behavior has been removed because it could
# hide hard to debug import errors (#68).
#
# Now mock (Python 2) and unittest.mock (Python 3) are lazy-loaded to make it
# possible to implement the new mock_use_standlone_module configuration option.
# As a consequence of this the undocumented pytest_mock.mock_module variable,
# which pointed to the actual mock module being used by the plugin, has been removed.
#
# DEFAULT is now available from the mocker fixture.
####################################################################################
[isort]
# https://github.com/timothycrosley/isort
# https://github.com/timothycrosley/isort/wiki/isort-Settings
# splits long import on multiple lines indented by 4 spaces
multi_line_output = 4
indent = " "
# by default isort don't check module indexes
not_skip = __init__.py
# will group `import x` and `from x import` of the same module.
force_sort_within_sections = true
# typing is stdlib on py35 but 3rd party on py34, let it hang in between
known_inbetweens = typing
sections = FUTURE,STDLIB,INBETWEENS,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
# for reformatting code with yapf
[yapf]
# source: https://github.com/google/brotli/blob/606a70b77926a47769fd885584800a33a079861a/setup.cfg
based_on_style=google
# BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF=True
# COLUMN_LIMIT=95
# DEDENT_CLOSING_BRACKETS=True
# SPACE_BETWEEN_ENDING_COMMA_AND_CLOSING_BRACKET=False
# [pep8]
# ignore = E265,E309,E501