Skip to content

Commit 1cf4756

Browse files
Update dependencies and ruff config (#220)
1 parent 8dba9bf commit 1cf4756

File tree

8 files changed

+1643
-2012
lines changed

8 files changed

+1643
-2012
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ repos:
4545
- id: no-commit-to-branch
4646
args: [--branch, dev, --branch, int, --branch, main]
4747
- repo: https://github.com/astral-sh/ruff-pre-commit
48-
rev: v0.4.10
48+
rev: v0.8.0
4949
hooks:
5050
- id: ruff
5151
args: [--fix, --exit-non-zero-on-fix]
5252
- id: ruff-format
5353
- repo: https://github.com/pre-commit/mirrors-mypy
54-
rev: v1.10.0
54+
rev: v1.13.0
5555
hooks:
5656
- id: mypy
5757
args: [--no-warn-unused-ignores]

.pyproject_generation/pyproject_template.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ fixable = [
4040
"UP", # e.g. List -> list
4141
"I", # sort imports
4242
"D", # pydocstyle
43+
"RUF022", # sort items in __all__
4344
]
4445
ignore = [
4546
"E111", # indentation with invalid multiple (for formatter)
@@ -59,6 +60,7 @@ ignore = [
5960
"D206", # indent-with-spaces (for formatter)
6061
"D300", # triple-single-quotes (for formatter)
6162
"UP040", # type statement (not yet supported by mypy)
63+
"PLC0206", # Extracting value from dictionary without calling `.items()`
6264
]
6365
select = [
6466
"C90", # McCabe Complexity

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ The service requires the following configuration parameters:
8080

8181
- **`service_name`** *(string)*: Short name of this service. Default: `"my_microservice"`.
8282

83-
- **`service_instance_id`** *(string)*: A string that uniquely identifies this instance across all instances of this service. This is included in log messages.
83+
- **`service_instance_id`** *(string, required)*: A string that uniquely identifies this instance across all instances of this service. This is included in log messages.
8484

8585

8686
Examples:
@@ -111,6 +111,8 @@ The service requires the following configuration parameters:
111111
```
112112

113113

114+
- **`log_traceback`** *(boolean)*: Whether to include exception tracebacks in log messages. Default: `true`.
115+
114116
- **`host`** *(string)*: IP of the host. Default: `"127.0.0.1"`.
115117

116118
- **`port`** *(integer)*: Port to expose the server on the specified host. Default: `8080`.

config_schema.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"additionalProperties": false,
3-
"description": "Modifies the orginal Settings class provided by the user",
3+
"description": "Modifies the original Settings class provided by the user",
44
"properties": {
55
"log_level": {
66
"default": "INFO",
@@ -47,6 +47,12 @@
4747
],
4848
"title": "Log Format"
4949
},
50+
"log_traceback": {
51+
"default": true,
52+
"description": "Whether to include exception tracebacks in log messages.",
53+
"title": "Log Traceback",
54+
"type": "boolean"
55+
},
5056
"host": {
5157
"default": "127.0.0.1",
5258
"description": "IP of the host.",

example_config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ host: 127.0.0.1
1010
language: Greek
1111
log_format: null
1212
log_level: INFO
13+
log_traceback: true
1314
openapi_url: /openapi.json
1415
port: 8080
1516
service_instance_id: '1'

lock/requirements-dev.txt

Lines changed: 1000 additions & 1162 deletions
Large diffs are not rendered by default.

lock/requirements.txt

Lines changed: 626 additions & 846 deletions
Large diffs are not rendered by default.

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ fixable = [
6666
"UP",
6767
"I",
6868
"D",
69+
"RUF022",
6970
]
7071
ignore = [
7172
"E111",
@@ -85,6 +86,7 @@ ignore = [
8586
"D206",
8687
"D300",
8788
"UP040",
89+
"PLC0206",
8890
]
8991
select = [
9092
"C90",

0 commit comments

Comments
 (0)