Skip to content

Commit 1a91d32

Browse files
hf-kkleinclaude
andcommitted
style: fix formatting and line length issues
Apply black/isort formatting and fix line-too-long pylint error. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6979c80 commit 1a91d32

3 files changed

Lines changed: 33 additions & 9 deletions

File tree

.claude/settings.local.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"WebFetch(domain:api.github.com)",
5+
"Bash(git fetch:*)",
6+
"Bash(git checkout:*)",
7+
"Bash(git pull:*)",
8+
"Skill(superpowers:brainstorming)",
9+
"Bash(python -m pytest:*)",
10+
"Bash(mkdir:*)",
11+
"Bash(git add:*)",
12+
"Bash(git commit:*)",
13+
"Bash(git push:*)",
14+
"Bash(git reset:*)",
15+
"Bash(git revert:*)",
16+
"Bash(git cherry-pick:*)",
17+
"Bash(black:*)",
18+
"Bash(isort:*)",
19+
"Bash(tox:*)"
20+
]
21+
}
22+
}

src/fundamend/sqlmodels/messageimplementationguide.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99

1010
# pylint: disable=too-few-public-methods, duplicate-code, missing-function-docstring
1111

12-
# the structures are similar to AHB, still we decided against inheritance, so there's naturally a little bit of duplication
12+
# the structures are similar to AHB, still we decided against inheritance,
13+
# so there's naturally a little bit of duplication
1314

1415

1516
try:
@@ -103,7 +104,10 @@ def from_model(cls, model: PydanticDataElement, position: Optional[int] = None)
103104
status_specification=model.status_specification.value,
104105
format_std=model.format_std,
105106
format_specification=model.format_specification,
106-
codes=[MigCode.from_model(pydantic_code, position=position_index) for position_index, pydantic_code in enumerate(model.codes)],
107+
codes=[
108+
MigCode.from_model(pydantic_code, position=position_index)
109+
for position_index, pydantic_code in enumerate(model.codes)
110+
],
107111
position=position,
108112
)
109113
return result
@@ -127,9 +131,7 @@ class MigDataElementGroup(SQLModel, table=True):
127131
Can contain a single or multiple data elements.
128132
"""
129133

130-
__table_args__ = (
131-
UniqueConstraint("segment_primary_key", "position", name="IX_mig_deg_position_once_per_segment"),
132-
)
134+
__table_args__ = (UniqueConstraint("segment_primary_key", "position", name="IX_mig_deg_position_once_per_segment"),)
133135
primary_key: UUID = Field(primary_key=True, default_factory=uuid.uuid4)
134136
id: str = Field(index=True) # e.g. 'C_C082'
135137
name: str = Field(index=True) # e.g. 'Identifikation des Beteiligten'
@@ -264,9 +266,7 @@ class MigSegmentGroup(SQLModel, table=True):
264266
Contains segments and segment groups.
265267
"""
266268

267-
__table_args__ = (
268-
UniqueConstraint("mig_primary_key", "position", name="IX_mig_sg_position_once_per_mig"),
269-
)
269+
__table_args__ = (UniqueConstraint("mig_primary_key", "position", name="IX_mig_sg_position_once_per_mig"),)
270270
primary_key: UUID = Field(primary_key=True, default_factory=uuid.uuid4)
271271
id: str = Field(index=True) # e.g. 'SG2'
272272
name: str = Field(index=True) # e.g. 'MP-ID Empfänger'

unittests/test_sqlmodels_messageimplementationguide.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ def test_sqlmodels_single_mig(sqlite_session: Session) -> None:
5252

5353
def test_sqlmodels_mig_with_uebertragungsdatei(sqlite_session: Session) -> None:
5454
mig = MigReader(
55-
Path(__file__).parent / "example_files" / "UTILTS_MIG_1.1d_Konsultationsfassung_2024_04_02_with_Uebertragungsdatei.xml"
55+
Path(__file__).parent
56+
/ "example_files"
57+
/ "UTILTS_MIG_1.1d_Konsultationsfassung_2024_04_02_with_Uebertragungsdatei.xml"
5658
).read()
5759
roundtrip_mig = _load_mig_to_and_from_db(sqlite_session, mig)
5860
mig_json = mig.model_dump(mode="json")

0 commit comments

Comments
 (0)