-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
114 lines (100 loc) · 3.4 KB
/
pyproject.toml
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
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.0"]
[tool.poetry]
authors = ["Frederik Aalund <[email protected]>"]
description = ""
name = "wright"
version = "0.1.0"
[tool.poetry.dependencies]
PyQt5 = {version = "=5.15.1", optional = true}
qasync = {version = "^0.22.0", optional = true}
QtAwesome = {version = "^1.1.1", optional = true}
matplotlib = {version = "^3.5.2", optional = true}
"RPi.GPIO" = "^0.7.1"
anyio = "3.x.x"
# We fix the version of cryptography to the latest one available
# through piwheels. Otherwise, we have to wait a *long* time for
# the rust modules to compile during install.
cryptography = "40.0.1"
py3tftp = "^1.3.0"
pydantic = "1.x.x"
python = "^3.9"
smbus2 = "^0.4.2"
typer = "^0.9.0"
libconf = "^2.0.1"
asyncssh = "^2.13.2"
pyserial = "^3.5"
[tool.poetry.dev-dependencies]
black = "^21.10b0"
isort = "^5.8.0"
mypy = "^0.812"
pydocstyle = "^6.0.0"
pylint = "^2.7.4"
rope = "^0.18.0"
[tool.poetry.extras]
"gui" = ["PyQt5", "qasync", "QtAwesome", "matplotlib"]
[[tool.poetry.source]]
name = "piwheels"
url = "https://www.piwheels.org/simple/"
priority = "primary"
[[tool.poetry.source]]
name = "PyPI"
priority = "supplemental"
[tool.poetry.scripts]
shipyard-gui = 'wright.gui:gui'
[tool.black]
target-version = ['py38']
[tool.isort]
profile = 'black'
[tool.pylint.master]
# i,j,k: You can use this for an integer index in a loop.
# fs: We use this in the tests to get a pyfakefs file system reference.
# Since pytest's dependency injection is name based, we have to use
# this exact argument name.
# tg: You can use this for an `anyio.TaskGroup`.
# io: You can use this for `typing.BinaryIO` (and friends).
# T,U,V: For `TypeVar`s
good-names = 'i,j,k,fs,tg,io,T,U,V' # Default is 'i,j,k,ex,Run,_'
# Increase the default values a bit. Yes, this may hurt maintainability
# ever so slightly but it increases the speed of development.
max-args = '7' # Default is 5
max-attributes = '12' # Default is 7
# Match black's default max line length
max-line-length = '88' # Default is 100
# Ignore the following non-idiomatic modules
ignored-modules = 'RPi'
[tool.pylint.similarities]
# Imports are often duplicated. If two different files use a lot of
# the same imports, there is just no way around it. Therefore, we
# simply ignore import statements completely when we look for duplicate
# code.
ignore-imports = 'y'
[tool.pylint.'messages control']
# Note that there is an ongoing discussion about, the current
# pylint defaults:
# https://github.com/PyCQA/pylint/issues/3512
#
# It's also interesting to note that the pylint authors disable
# some checks for the official pylint repo:
# https://github.com/PyCQA/pylint/blob/master/pylintrc#L56
### IF YOU ENABLE A PYLINT CHECK THEN EXPLAIN WHY BELOW
enable = '''
'''
### IF YOU DISABLE A PYLINT CHECK THEN EXPLAIN WHY BELOW
#
# fixme: We use "TODO: " to note areas that we can improve.
# It's nice to have this directly in the code in a way that
# we can easily search for.
# Related to: https://github.com/PyCQA/pylint/issues/2874
#
# missing-module-docstring,
# missing-class-docstring,
# missing-function-docstring: pydocstyle handles all this
# See: https://pylint.readthedocs.io/en/latest/faq.html#i-am-using-another-popular-linter-alongside-pylint-which-messages-should-i-disable-to-avoid-duplicates
disable = '''
fixme,
missing-module-docstring,
missing-class-docstring,
missing-function-docstring,
'''