Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pyproject.toml - dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9620340b19008b0a3277dcdb5f46777ac2ec15dd (plain)
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
[build-system]
requires = [
  "setuptools >= 43.0.0",
]
build-backend = "setuptools.build_meta"


[tool.codespell]
skip = "*__pycache__*,test,*.egg-info,.git,*.po,*.nsi,*.spec"
ignore-words-list = "claus,pres,ser,trough"


[tool.pyright]
pythonVersion = "3.10"
pythonPlatform = "All"
typeCheckingMode = "strict"

reportUnnecessaryTypeIgnoreComment = "error"
reportPropertyTypeMismatch = "error"
reportMissingModuleSource = "none"

exclude = [
  "**/__pycache__",
  ".git",
  "gajim/gtk/account_wizard.py",
  "gajim/gtk/add_contact.py",
  "gajim/gtk/adhoc.py",
  "gajim/gtk/advanced_config.py",
  "gajim/gtk/component_search.py",
  "gajim/gtk/dataform.py",
  "gajim/gtk/discovery.py",
  "gajim/gtk/filetransfer.py",
  "gajim/gtk/vcard_grid.py",
  "gajim/gtk/types.py",
  "gajim/gtk/start_chat.py",
  "gajim/gtk/settings.py",
  "gajim/gtk/server_info.py",
  "gajim/gtk/groupchat_info.py",
  "gajim/plugins/pluginmanager.py",
]
include = [
    "launch.py",
    "setup.py",
    ".ci/*",
    "mac/*",
    "scripts/*",
    "win/*",
    "gajim/common/application.py",
    "gajim/common/call_manager.py",
    "gajim/common/cert_store.py",
    "gajim/common/commands.py",
    "gajim/common/configpaths.py",
    "gajim/common/const.py",
    "gajim/common/dbus/*",
    "gajim/common/events.py",
    "gajim/common/exceptions.py",
    "gajim/common/filetransfer.py",
    "gajim/common/ged.py",
    "gajim/common/i18n.py",
    "gajim/common/idle.py",
    "gajim/common/logging_helpers.py",
    "gajim/common/modules/chat_markers.py",
    "gajim/common/modules/pep.py",
    "gajim/common/modules/register.py",
    "gajim/common/modules/vcard4.py",
    "gajim/common/modules/vcard_temp.py",
    "gajim/common/passwords.py",
    "gajim/common/preview_helpers.py",
    "gajim/common/regex.py",
    "gajim/common/setting_values.py",
    "gajim/common/sound.py",
    "gajim/common/storage/*",
    "gajim/common/styling.py",
    "gajim/common/task_manager.py",
    "gajim/common/util/*",
    "gajim/gajim.py",
    "gajim/gajim_remote.py",
    "gajim/gtk/*",
    "gajim/plugins/*",
]


[tool.ruff]
line-length = 80

select = [
  "A",      # flake8-builtins
  # "ANN",  # flake8-annotations
  # "ARG",    # flake8-unused-arguments
  "B",      # flake8-bugbear
  "BLE",    # flake8-blind-except
  "C",      # flake8-comprehensions
  "C901",   # mccabe
  # "D",    # pydocstyle
  "E",      # pycodestyle
  # "EM",     # flake8-errmsg
  # "ERA",    # eradicate
  "F",      # pyflakes  
  # "FBT",    # flake8-boolean-trap
  # "I",    # flake8-tidy-imports, isort
  "ICN",    # flake8-import-conventions
  "N",      # pep8-naming
  # "PDV",    # pandas-vet
  "PGH",    # pygrep-hooks
  "PLC",    # pylint
  "PLE",    # pylint
  "PLR",    # pylint
  "PLW",    # pylint
  "Q",      # flake8-quotes
  "RUF",    # Ruff-specific rules
  # "RET",    # flake8-return
  "S",      # flake8-bandit
  "SIM",    # flake8-simplify
  # "T",      # flake8-debugger, flake8-print
  # "TID",    # flake8-tidy-imports
  "UP",     # pyupgrade
  "W",      # pycodestyle
  "YTT",    # flake8-2020
]

ignore = [
  "A003",   # Class attribute is shadowing python builtin
  "B904",   # Within an except clause ..
  "BLE001", # Blind except Exception: statement
  "C901",   # too complex
  "FBT003", # Boolean positional value in function call
  "N802",   # Function name should be lower case
  "N806",   # Variable should be lower case
  "N817",   # CamelCase imported as acronym
  "N818",   # Exception name should be named with an Error suffix
  "RUF001", # AmbiguousUnicodeCharacterString
  "RUF002", # AmbiguousUnicodeCharacterDocstring
  "RUF003", # AmbiguousUnicodeCharacterComment
  "RUF100", # Unused `noqa` directive
  "S101",   # Use of `assert` detected
  "UP007",  # Use X | Y for type annotations
]

exclude = [
  ".eggs",
  ".git",
  ".ruff_cache",
  ".venv",
  "build",
  "dist",
  "venv",
  "*.pyi",
  # Code Folders
  "gajim/gui",
  "typings",
  "gajim/common/config.py",     # legacy module, will be removed
  "gajim/common/optparser.py",  # legacy module, will be removed
  "gajim/common/socks5.py",     # legacy module, will be removed
]

# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
target-version = "py310"

[tool.ruff.per-file-ignores]
"test/*" = ["E402"]
"test/no_gui/test_styling.py" = ["RUF001", "E501"]
"test/no_gui/test_regex.py" = ["RUF001"]


[tool.ruff.mccabe]
max-complexity = 15

[tool.ruff.flake8-quotes]
inline-quotes = "single"
docstring-quotes = "single"
multiline-quotes = "single"

[tool.isort]
force_alphabetical_sort_within_sections = true
force_single_line = true
group_by_package = true
known_typing = ["typing"]
sections = ["FUTURE", "TYPING", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
skip_gitignore = true