fluidattacks_utils_logger 3.0.0__tar.gz → 3.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/PKG-INFO +3 -2
  2. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/build/default.nix +5 -3
  3. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/flake.lock +63 -112
  4. fluidattacks_utils_logger-3.0.4/flake.nix +28 -0
  5. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/fluidattacks_utils_logger/__init__.py +1 -1
  6. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/fluidattacks_utils_logger/env.py +2 -2
  7. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/fluidattacks_utils_logger/handlers.py +1 -1
  8. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/fluidattacks_utils_logger/logger.py +6 -6
  9. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/pyproject.toml +8 -2
  10. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/ruff.toml +21 -9
  11. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/tests/arch/test_arch.py +2 -2
  12. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/tests/test_logger.py +7 -3
  13. fluidattacks_utils_logger-3.0.4/uv.lock +681 -0
  14. fluidattacks_utils_logger-3.0.0/flake.nix +0 -19
  15. fluidattacks_utils_logger-3.0.0/uv.lock +0 -1151
  16. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/.envrc +0 -0
  17. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/build/filter.nix +0 -0
  18. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/fluidattacks_utils_logger/levels.py +0 -0
  19. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/fluidattacks_utils_logger/py.typed +0 -0
  20. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/mypy.ini +0 -0
  21. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/tests/__init__.py +0 -0
  22. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/tests/arch/__init__.py +0 -0
  23. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/tests/arch/arch.py +0 -0
  24. {fluidattacks_utils_logger-3.0.0 → fluidattacks_utils_logger-3.0.4}/tests/py.typed +0 -0
@@ -1,9 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fluidattacks_utils_logger
3
- Version: 3.0.0
3
+ Version: 3.0.4
4
4
  Summary: Common logger handlers
5
5
  Author-email: Product Team <development@fluidattacks.com>
6
6
  Requires-Python: >=3.11
7
7
  Classifier: License :: OSI Approved :: MIT License
8
- Requires-Dist: fluidattacks-core >=4.0.0, <5.0.0
8
+ Requires-Dist: fluidattacks-core >=9.0.0, <10.0.0
9
9
  Requires-Dist: fa-purity >=2.5.2, <3.0.0
10
+ Requires-Dist: python-json-logger >=3.3.0, <5.0.0
@@ -1,7 +1,9 @@
1
- { nixpkgs, builders, scripts, src, }: {
1
+ { src }:
2
+ {
2
3
  inherit src;
3
4
  root_path = "observes/common/utils-logger";
4
5
  module_name = "fluidattacks_utils_logger";
5
- pypi_token_var = "UTILS_LOGGER_TOKEN";
6
- override = b: b;
6
+ pypi_token = {
7
+ method = "oidc";
8
+ };
7
9
  }
@@ -5,11 +5,11 @@
5
5
  "nixpkgs-lib": "nixpkgs-lib"
6
6
  },
7
7
  "locked": {
8
- "lastModified": 1754487366,
9
- "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=",
8
+ "lastModified": 1762810396,
9
+ "narHash": "sha256-dxFVgQPG+R72dkhXTtqUm7KpxElw3u6E+YlQ2WaDgt8=",
10
10
  "owner": "hercules-ci",
11
11
  "repo": "flake-parts",
12
- "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18",
12
+ "rev": "0bdadb1b265fb4143a75bd1ec7d8c915898a9923",
13
13
  "type": "github"
14
14
  },
15
15
  "original": {
@@ -20,26 +20,11 @@
20
20
  },
21
21
  "nix_filter": {
22
22
  "locked": {
23
- "lastModified": 1731533336,
24
- "narHash": "sha256-oRam5PS1vcrr5UPgALW0eo1m/5/pls27Z/pabHNy2Ms=",
23
+ "lastModified": 1757882181,
24
+ "narHash": "sha256-+cCxYIh2UNalTz364p+QYmWHs0P+6wDhiWR4jDIKQIU=",
25
25
  "owner": "numtide",
26
26
  "repo": "nix-filter",
27
- "rev": "f7653272fd234696ae94229839a99b73c9ab7de0",
28
- "type": "github"
29
- },
30
- "original": {
31
- "owner": "numtide",
32
- "repo": "nix-filter",
33
- "type": "github"
34
- }
35
- },
36
- "nix_filter_2": {
37
- "locked": {
38
- "lastModified": 1731533336,
39
- "narHash": "sha256-oRam5PS1vcrr5UPgALW0eo1m/5/pls27Z/pabHNy2Ms=",
40
- "owner": "numtide",
41
- "repo": "nix-filter",
42
- "rev": "f7653272fd234696ae94229839a99b73c9ab7de0",
27
+ "rev": "59c44d1909c72441144b93cf0f054be7fe764de5",
43
28
  "type": "github"
44
29
  },
45
30
  "original": {
@@ -50,26 +35,27 @@
50
35
  },
51
36
  "nixpkgs": {
52
37
  "locked": {
53
- "lastModified": 1736441877,
54
- "narHash": "sha256-m3+PhBFkDwqo9lBplG4AyMW8P4/KcioJRS1UG8N7okM=",
38
+ "lastModified": 1758690382,
39
+ "narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=",
55
40
  "owner": "nixos",
56
41
  "repo": "nixpkgs",
57
- "rev": "ce3899414dab3297cf025bfa356dc2da426feefd",
42
+ "rev": "e643668fd71b949c53f8626614b21ff71a07379d",
58
43
  "type": "github"
59
44
  },
60
45
  "original": {
61
46
  "owner": "nixos",
47
+ "ref": "nixos-unstable",
62
48
  "repo": "nixpkgs",
63
49
  "type": "github"
64
50
  }
65
51
  },
66
52
  "nixpkgs-lib": {
67
53
  "locked": {
68
- "lastModified": 1753579242,
69
- "narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=",
54
+ "lastModified": 1761765539,
55
+ "narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=",
70
56
  "owner": "nix-community",
71
57
  "repo": "nixpkgs.lib",
72
- "rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e",
58
+ "rev": "719359f4562934ae99f5443f20aa06c2ffff91fc",
73
59
  "type": "github"
74
60
  },
75
61
  "original": {
@@ -95,22 +81,6 @@
95
81
  }
96
82
  },
97
83
  "nixpkgs_3": {
98
- "locked": {
99
- "lastModified": 1758690382,
100
- "narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=",
101
- "owner": "nixos",
102
- "repo": "nixpkgs",
103
- "rev": "e643668fd71b949c53f8626614b21ff71a07379d",
104
- "type": "github"
105
- },
106
- "original": {
107
- "owner": "nixos",
108
- "ref": "nixos-unstable",
109
- "repo": "nixpkgs",
110
- "type": "github"
111
- }
112
- },
113
- "nixpkgs_4": {
114
84
  "locked": {
115
85
  "lastModified": 1761373498,
116
86
  "narHash": "sha256-Q/uhWNvd7V7k1H1ZPMy/vkx3F8C13ZcdrKjO7Jv7v0c=",
@@ -128,11 +98,11 @@
128
98
  },
129
99
  "nixpkgs_flake": {
130
100
  "locked": {
131
- "lastModified": 1756313514,
132
- "narHash": "sha256-3Xbak0pXR8ziNv1ghHyJ5a5Ti2kt/LWq6hKZVJTvjBs=",
101
+ "lastModified": 1778253243,
102
+ "narHash": "sha256-KkH2QvU6iRLDTGGEwH5jnMqHWj4zMTuHxi1S1zdr01w=",
133
103
  "owner": "nixos",
134
104
  "repo": "nixpkgs",
135
- "rev": "181464235b2daff8725773fef43ffc9d6b02e1c2",
105
+ "rev": "4fcda7103530b23c5ca44286344912082aad4220",
136
106
  "type": "github"
137
107
  },
138
108
  "original": {
@@ -141,56 +111,9 @@
141
111
  "type": "github"
142
112
  }
143
113
  },
144
- "observes_flake_builder": {
145
- "inputs": {
146
- "nix_filter": "nix_filter",
147
- "nixpkgs_flake": "nixpkgs_flake",
148
- "pynix_flake": "pynix_flake",
149
- "pyproject-build-systems": "pyproject-build-systems",
150
- "pyproject-nix": "pyproject-nix_2",
151
- "shell-helpers": "shell-helpers",
152
- "uv2nix": "uv2nix_2"
153
- },
154
- "locked": {
155
- "dir": "observes/common/std_flake_2",
156
- "lastModified": 1761684858,
157
- "narHash": "sha256-gybMRO/MSOPXQjI//u2UKfvs8pD0sACqL2Kjp+xR4rI=",
158
- "ref": "refs/heads/trunk",
159
- "rev": "c5053864bb838edbe226d74a650d901c0270843b",
160
- "shallow": true,
161
- "type": "git",
162
- "url": "ssh://git@gitlab.com/fluidattacks/universe"
163
- },
164
- "original": {
165
- "dir": "observes/common/std_flake_2",
166
- "rev": "c5053864bb838edbe226d74a650d901c0270843b",
167
- "shallow": true,
168
- "type": "git",
169
- "url": "ssh://git@gitlab.com/fluidattacks/universe"
170
- }
171
- },
172
- "pynix_flake": {
173
- "inputs": {
174
- "nix_filter": "nix_filter_2",
175
- "nixpkgs": "nixpkgs"
176
- },
177
- "locked": {
178
- "lastModified": 1758642502,
179
- "narHash": "sha256-PD/bQMz2dqZSkydHyvRh+jS/0qoV8SdcIVs6sassteQ=",
180
- "owner": "dmurciaatfluid",
181
- "repo": "python_nix_builder",
182
- "rev": "809aafe2e1995e72c15378d099bf251b78f04a20",
183
- "type": "gitlab"
184
- },
185
- "original": {
186
- "owner": "dmurciaatfluid",
187
- "repo": "python_nix_builder",
188
- "type": "gitlab"
189
- }
190
- },
191
114
  "pyproject-build-systems": {
192
115
  "inputs": {
193
- "nixpkgs": "nixpkgs_2",
116
+ "nixpkgs": "nixpkgs",
194
117
  "pyproject-nix": "pyproject-nix",
195
118
  "uv2nix": "uv2nix"
196
119
  },
@@ -211,7 +134,7 @@
211
134
  "pyproject-nix": {
212
135
  "inputs": {
213
136
  "nixpkgs": [
214
- "observes_flake_builder",
137
+ "python_builder",
215
138
  "pyproject-build-systems",
216
139
  "nixpkgs"
217
140
  ]
@@ -232,7 +155,7 @@
232
155
  },
233
156
  "pyproject-nix_2": {
234
157
  "inputs": {
235
- "nixpkgs": "nixpkgs_3"
158
+ "nixpkgs": "nixpkgs_2"
236
159
  },
237
160
  "locked": {
238
161
  "lastModified": 1762427963,
@@ -251,7 +174,7 @@
251
174
  "pyproject-nix_3": {
252
175
  "inputs": {
253
176
  "nixpkgs": [
254
- "observes_flake_builder",
177
+ "python_builder",
255
178
  "uv2nix",
256
179
  "nixpkgs"
257
180
  ]
@@ -270,45 +193,73 @@
270
193
  "type": "github"
271
194
  }
272
195
  },
196
+ "python_builder": {
197
+ "inputs": {
198
+ "nix_filter": "nix_filter",
199
+ "nixpkgs_flake": "nixpkgs_flake",
200
+ "pyproject-build-systems": "pyproject-build-systems",
201
+ "pyproject-nix": "pyproject-nix_2",
202
+ "shell-helpers": "shell-helpers",
203
+ "uv2nix": "uv2nix_2"
204
+ },
205
+ "locked": {
206
+ "dir": "common/utils/python-builder",
207
+ "lastModified": 1785790367,
208
+ "narHash": "sha256-Br5oTB6LNGANZMUecvZhlXpA0k0wb0EKmOqyQeYCe7A=",
209
+ "ref": "refs/heads/trunk",
210
+ "rev": "f66f38301987775ceb39ee72388ef0885ef30d13",
211
+ "shallow": true,
212
+ "type": "git",
213
+ "url": "ssh://git@gitlab.com/fluidattacks/universe"
214
+ },
215
+ "original": {
216
+ "dir": "common/utils/python-builder",
217
+ "rev": "f66f38301987775ceb39ee72388ef0885ef30d13",
218
+ "shallow": true,
219
+ "type": "git",
220
+ "url": "ssh://git@gitlab.com/fluidattacks/universe"
221
+ }
222
+ },
273
223
  "root": {
274
224
  "inputs": {
275
- "observes_flake_builder": "observes_flake_builder"
225
+ "python_builder": "python_builder"
276
226
  }
277
227
  },
278
228
  "shell-helpers": {
279
229
  "inputs": {
280
230
  "flake-parts": "flake-parts",
281
231
  "nixpkgs": [
282
- "observes_flake_builder",
232
+ "python_builder",
283
233
  "nixpkgs_flake"
284
234
  ]
285
235
  },
286
236
  "locked": {
287
237
  "dir": "common/utils/shell-helpers",
288
- "lastModified": 1752896460,
289
- "narHash": "sha256-AsyTatXMx839cGsF6knwTrDZHk3Eue2QD3eSP7bkmpg=",
290
- "owner": "fluidattacks",
291
- "repo": "universe",
292
- "rev": "27749d2c3a2b018eb010a322e5e1352f993c9e86",
293
- "type": "github"
238
+ "lastModified": 1762806066,
239
+ "narHash": "sha256-Wz99Fl7SpPU1NkTHJ36XOo6DjOEAMXCw3ThRABOS2Hs=",
240
+ "ref": "refs/heads/trunk",
241
+ "rev": "d73cfdc7ae9e7f547e22a4481d4c2ccce38b26a8",
242
+ "shallow": true,
243
+ "type": "git",
244
+ "url": "ssh://git@gitlab.com/fluidattacks/universe"
294
245
  },
295
246
  "original": {
296
247
  "dir": "common/utils/shell-helpers",
297
- "owner": "fluidattacks",
298
- "repo": "universe",
299
- "rev": "27749d2c3a2b018eb010a322e5e1352f993c9e86",
300
- "type": "github"
248
+ "rev": "d73cfdc7ae9e7f547e22a4481d4c2ccce38b26a8",
249
+ "shallow": true,
250
+ "type": "git",
251
+ "url": "ssh://git@gitlab.com/fluidattacks/universe"
301
252
  }
302
253
  },
303
254
  "uv2nix": {
304
255
  "inputs": {
305
256
  "nixpkgs": [
306
- "observes_flake_builder",
257
+ "python_builder",
307
258
  "pyproject-build-systems",
308
259
  "nixpkgs"
309
260
  ],
310
261
  "pyproject-nix": [
311
- "observes_flake_builder",
262
+ "python_builder",
312
263
  "pyproject-build-systems",
313
264
  "pyproject-nix"
314
265
  ]
@@ -329,7 +280,7 @@
329
280
  },
330
281
  "uv2nix_2": {
331
282
  "inputs": {
332
- "nixpkgs": "nixpkgs_4",
283
+ "nixpkgs": "nixpkgs_3",
333
284
  "pyproject-nix": "pyproject-nix_3"
334
285
  },
335
286
  "locked": {
@@ -0,0 +1,28 @@
1
+ {
2
+ description = "Log utils for observes packages";
3
+
4
+ inputs = {
5
+ python_builder = {
6
+ url = "git+ssh://git@gitlab.com/fluidattacks/universe?shallow=1&rev=f66f38301987775ceb39ee72388ef0885ef30d13&dir=common/utils/python-builder";
7
+ };
8
+ };
9
+
10
+ outputs =
11
+ { self, ... }@inputs:
12
+ let
13
+ build_args =
14
+ {
15
+ system,
16
+ python_version,
17
+ nixpkgs,
18
+ builders,
19
+ scripts,
20
+ }:
21
+ import ./build {
22
+ src = import ./build/filter.nix nixpkgs.nix-filter self;
23
+ };
24
+ in
25
+ {
26
+ packages = inputs.python_builder.outputs.build build_args;
27
+ };
28
+ }
@@ -15,7 +15,7 @@ from .levels import (
15
15
  LoggingLvl,
16
16
  )
17
17
 
18
- __version__ = "3.0.0"
18
+ __version__ = "3.0.4"
19
19
 
20
20
 
21
21
  def set_main_log(
@@ -19,7 +19,7 @@ def current_app_env() -> Cmd[Envs]:
19
19
  def _action() -> Envs:
20
20
  return Envs(environ.get("OBSERVES_ENV", "production"))
21
21
 
22
- return Cmd.wrap_impure(_action)
22
+ return Cmd[Envs].wrap_impure(_action)
23
23
 
24
24
 
25
25
  def observes_debug() -> Cmd[bool]:
@@ -27,4 +27,4 @@ def observes_debug() -> Cmd[bool]:
27
27
  _debug = environ.get("OBSERVES_DEBUG", "")
28
28
  return _debug.lower() == "true"
29
29
 
30
- return Cmd.wrap_impure(_action)
30
+ return Cmd[bool].wrap_impure(_action)
@@ -50,7 +50,7 @@ def logger_handler_with_env(
50
50
  handler.setFormatter(formatter)
51
51
  return handler
52
52
 
53
- return Cmd.wrap_impure(_action)
53
+ return Cmd[Handler].wrap_impure(_action)
54
54
 
55
55
 
56
56
  def logger_handler(conf: LoggingConf, target: IO[str]) -> Cmd[Handler]:
@@ -24,16 +24,16 @@ class Logger:
24
24
  _inner: _Logger
25
25
 
26
26
  def critical(self, formatted_msg: str, values: FrozenList[str]) -> Cmd[None]:
27
- return Cmd.wrap_impure(lambda: self._inner.logger.critical(formatted_msg, *values))
27
+ return Cmd[None].wrap_impure(lambda: self._inner.logger.critical(formatted_msg, *values))
28
28
 
29
29
  def debug(self, formatted_msg: str, values: FrozenList[str]) -> Cmd[None]:
30
- return Cmd.wrap_impure(lambda: self._inner.logger.debug(formatted_msg, *values))
30
+ return Cmd[None].wrap_impure(lambda: self._inner.logger.debug(formatted_msg, *values))
31
31
 
32
32
  def info(self, formatted_msg: str, values: FrozenList[str]) -> Cmd[None]:
33
- return Cmd.wrap_impure(lambda: self._inner.logger.info(formatted_msg, *values))
33
+ return Cmd[None].wrap_impure(lambda: self._inner.logger.info(formatted_msg, *values))
34
34
 
35
35
  def warning(self, formatted_msg: str, values: FrozenList[str]) -> Cmd[None]:
36
- return Cmd.wrap_impure(lambda: self._inner.logger.warning(formatted_msg, *values))
36
+ return Cmd[None].wrap_impure(lambda: self._inner.logger.warning(formatted_msg, *values))
37
37
 
38
38
 
39
39
  def get_logger(name: str) -> Cmd[Logger]:
@@ -41,7 +41,7 @@ def get_logger(name: str) -> Cmd[Logger]:
41
41
  log = _Logger(logging.getLogger(name))
42
42
  return Logger(log)
43
43
 
44
- return Cmd.wrap_impure(_action)
44
+ return Cmd[Logger].wrap_impure(_action)
45
45
 
46
46
 
47
47
  def set_logger(name: str, lvl: LoggingLvl, handlers: FrozenList[Cmd[logging.Handler]]) -> Cmd[None]:
@@ -51,4 +51,4 @@ def set_logger(name: str, lvl: LoggingLvl, handlers: FrozenList[Cmd[logging.Hand
51
51
  for item in handlers:
52
52
  log.addHandler(unwrapper.act(item))
53
53
 
54
- return Cmd.new_cmd(_action)
54
+ return Cmd[None].new_cmd(_action)
@@ -4,8 +4,9 @@ authors = [{ name = "Product Team", email = "development@fluidattacks.com" }]
4
4
  classifiers = ["License :: OSI Approved :: MIT License"]
5
5
  requires-python = ">=3.11"
6
6
  dependencies = [
7
- "fluidattacks-core >=4.0.0, <5.0.0",
7
+ "fluidattacks-core >=9.0.0, <10.0.0",
8
8
  "fa-purity >=2.5.2, <3.0.0",
9
+ "python-json-logger >=3.3.0, <5.0.0",
9
10
  ]
10
11
  description = "Common logger handlers"
11
12
  dynamic = ["version"]
@@ -17,8 +18,13 @@ build-backend = "flit_core.buildapi"
17
18
  [dependency-groups]
18
19
  dev = [
19
20
  "arch-lint >=5.0.0, <6.0.0",
21
+ "basedpyright>=1.39.8",
20
22
  "mypy >=1.18.2, <2.0.0",
21
- "pytest >=8.4.2, <9.0.0",
23
+ "pytest >=9.0.3, <10.0.0",
22
24
  "pytest-cov >=7.0.0, <8.0.0",
23
25
  "ruff >=0.14.1, <1.0.0",
24
26
  ]
27
+
28
+ [tool.uv]
29
+ exclude-newer = "7 days"
30
+ exclude-newer-package = { fluidattacks-core = "2099-01-02T00:00:00Z", fluid-blends = "2099-01-02T00:00:00Z" }
@@ -4,23 +4,26 @@ indent-width = 4
4
4
  target-version = "py311"
5
5
 
6
6
  [lint]
7
+ preview = true
8
+ explicit-preview-rules = true
7
9
  select = ["ALL"]
10
+ extend-select = ["PLR1702", "PLR0916"]
8
11
  ignore = [
9
12
  "FBT001", # debatable
10
- "FBT003", # conflict with the convention of denying kwargs
13
+ "FBT003", # conflict with the convention of denying kwargs
11
14
  "RET503", # raises false positives
12
- "N818", # semantics on names, the type already has the semantics
15
+ "N818", # semantics on names, the type already has the semantics
13
16
  "TC001", # import cycles can be hidden
14
17
  "TC002", # import cycles can be hidden
15
18
  "TC003", # technical debt!
16
19
  "FLY002", # f-string is not type safe: implicit str conversion can hide codification issues
17
- "D203", # conflict with D211 one must be ignored
18
- "D212", # conflict with D213 one must be ignored
19
- "D104", # missing docs; technical debt!
20
- "D103", # missing docs; technical debt!
21
- "D102", # missing docs; technical debt!
22
- "D101", # missing docs; technical debt!
23
- "D100", # missing docs; technical debt!
20
+ "D203", # conflict with D211 one must be ignored
21
+ "D212", # conflict with D213 one must be ignored
22
+ "D104", # missing docs; technical debt!
23
+ "D103", # missing docs; technical debt!
24
+ "D102", # missing docs; technical debt!
25
+ "D101", # missing docs; technical debt!
26
+ "D100", # missing docs; technical debt!
24
27
  ]
25
28
  fixable = ["ALL"]
26
29
  unfixable = []
@@ -35,3 +38,12 @@ quote-style = "double"
35
38
  indent-style = "space"
36
39
  skip-magic-trailing-comma = false
37
40
  line-ending = "lf"
41
+
42
+ [lint.mccabe]
43
+ max-complexity = 8
44
+
45
+ [lint.pylint]
46
+ max-branches = 8
47
+ max-nested-blocks = 4
48
+ max-statements = 25
49
+ max-bool-expr = 5
@@ -20,7 +20,7 @@ root = "fluidattacks_utils_logger"
20
20
 
21
21
 
22
22
  def test_dag_creation() -> None:
23
- project_dag()
23
+ _ = project_dag()
24
24
 
25
25
 
26
26
  def test_dag_completeness() -> None:
@@ -29,7 +29,7 @@ def test_dag_completeness() -> None:
29
29
 
30
30
 
31
31
  def test_forbidden_creation() -> None:
32
- forbidden_allowlist()
32
+ _ = forbidden_allowlist()
33
33
 
34
34
 
35
35
  def test_forbidden() -> None:
@@ -36,7 +36,11 @@ def test_json_formatter_in_production() -> None:
36
36
 
37
37
  output_content = output_stream.getvalue()
38
38
  try:
39
- formatted_output: dict[str, str] = json.loads(output_content.strip())
39
+ # json.loads returns Any; the shape is asserted below, not
40
+ # statically checkable.
41
+ formatted_output: dict[str, str] = json.loads( # pyright: ignore[reportAny]
42
+ output_content.strip(),
43
+ )
40
44
  assert "ddsource" in formatted_output
41
45
  assert "dd.service" in formatted_output
42
46
  assert "dd.version" in formatted_output
@@ -46,7 +50,7 @@ def test_json_formatter_in_production() -> None:
46
50
  except json.JSONDecodeError as exc:
47
51
  raise RuntimeError from exc
48
52
 
49
- return Cmd.wrap_value(None)
53
+ return Cmd[None].wrap_value(None)
50
54
 
51
55
  test_cmd = set_logger(
52
56
  name=logger_name,
@@ -84,7 +88,7 @@ def test_colorful_formatter_in_development() -> None:
84
88
  assert f"[{logger_name}]" in output_content
85
89
  assert test_message in output_content
86
90
 
87
- return Cmd.wrap_value(None)
91
+ return Cmd[None].wrap_value(None)
88
92
 
89
93
  test_cmd = set_logger(
90
94
  name=logger_name,