Skip to content

Commit 5f54533

Browse files
committed
style: ruff auto-fix across project
- split combined imports (PEP8) - remove unnecessary f-strings in print/log calls - fix bare except → except Exception Your code has been rated at 9.72/10 (previous run: 9.72/10, +0.00)
1 parent ecc8f41 commit 5f54533

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+138
-114
lines changed

aura_engine.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
from datetime import datetime, timedelta
44

55
import os
6-
import sys, subprocess
6+
import sys
7+
import subprocess
78

89
import signal
910

1011

1112
import psutil
12-
import time, re
13+
import time
14+
import re
1315

1416
#from config.settings import LANGUAGETOOL_CHECK_URL
1517

@@ -54,7 +56,13 @@
5456

5557

5658

57-
import sys, os, atexit, requests, logging, platform, importlib
59+
import sys
60+
import os
61+
import atexit
62+
import requests
63+
import logging
64+
import platform
65+
import importlib
5866
from pathlib import Path
5967

6068

config/maps/koans_deutsch/05_koan_such_beispiel/de-DE/FUZZY_MAP_pre.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#TODO: Was passiert jetzt?
4545

4646
# EXAMPLE: suche in x text kapitel 123 vfdph text 123
47-
('bible suche', fr'^suche in (?P<book>\w*[ ]?\w+) kapitel (?P<chapter>\d+) [vfdph]\w+ (?P<verse>\d+)$', 90, {
47+
('bible suche', r'^suche in (?P<book>\w*[ ]?\w+) kapitel (?P<chapter>\d+) [vfdph]\w+ (?P<verse>\d+)$', 90, {
4848
'flags': re.IGNORECASE,
4949
'on_match_exec': [CONFIG_DIR / 'bible_search.py']
5050
}),

config/maps/koans_deutsch/06_koan_wikipedia_suche/de-DE/FUZZY_MAP_pre.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030

31-
tips = fr"""
31+
tips = r"""
3232
3333
TODO: Was passiert jetzt?
3434
TODO: Mehr Informationen, Fehlermeldungen usw, erhalten wir meisens, wenn wir die Log lesen:

config/maps/koans_english/05_koan_search_example/de-DE/FUZZY_MAP_pre.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#('search in Ruth chapter 1 verse 1', fr'^.*$', 90, {'flags': re.IGNORECASE,'skip_list': ['fullMatchStop', 'LanguageTool', 'LT_SKIP_RATIO_THRESHOLD']}),
2424

2525
# EXAMPLE: search in [book] chapter [number] verse [number]
26-
('(bible) search', fr'^search in (?P<book>\w*[ ]?\w+) chapter (?P<chapter>\d+) [v]\w+ (?P<verse>\d+)$', 90,
26+
('(bible) search', r'^search in (?P<book>\w*[ ]?\w+) chapter (?P<chapter>\d+) [v]\w+ (?P<verse>\d+)$', 90,
2727
{
2828
'flags': re.IGNORECASE,
2929
'on_match_exec': [CONFIG_DIR / 'bible_search.py']

config/maps/koans_english/05_koan_search_example/en-US/FUZZY_MAP_pre.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#('search in Ruth chapter 1 verse 1', fr'^.*$', 90, {'flags': re.IGNORECASE,'skip_list': ['fullMatchStop', 'LanguageTool', 'LT_SKIP_RATIO_THRESHOLD']}),
2424

2525
# EXAMPLE: search in [book] chapter [number] verse [number]
26-
('bible search', fr'^search in (?P<book>\w*[ ]?\w+) chapter (?P<chapter>\d+) [v]\w+ (?P<verse>\d+)$', 90, {
26+
('bible search', r'^search in (?P<book>\w*[ ]?\w+) chapter (?P<chapter>\d+) [v]\w+ (?P<verse>\d+)$', 90, {
2727
'flags': re.IGNORECASE,
2828
'on_match_exec': [CONFIG_DIR / 'bible_search.py']
2929
}),

config/maps/koans_english/06_koan_wikipedia_suche/de-DE/FUZZY_MAP_pre.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030

31-
tips = fr"""
31+
tips = r"""
3232
3333
TODO: Was passiert jetzt?
3434
TODO: Mehr Informationen, Fehlermeldungen usw, erhalten wir meisens, wenn wir die Log lesen:

config/maps/plugins/AI_Prompts_Python/de-DE/FUZZY_MAP_pre.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# - flags: Use {'flags': re.IGNORECASE} for case-insensitivity, or 0 for case-sensitivity.
1111
# 2. If no regex matches, a simple fuzzy match is performed on the remaining rules.
1212

13-
multiline_string_1 = f"""
13+
multiline_string_1 = """
1414
Use in Source-Code always English(also for Comments).
1515
- Bitte achte darauf (in deinen Tipps) das (bei use) möglichst keine closed source installiert wird und das es nichts kostet.
1616

config/maps/plugins/anki_quiz/analyze_anki.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def analyze():
4747
notes = conn.execute("SELECT flds FROM notes LIMIT 20").fetchall()
4848
notes = conn.execute("SELECT flds FROM notes").fetchall() # KEIN LIMIT!
4949

50-
print(f"\n--- ANALYSE DER ERSTEN 20 KARTEN ---\n")
50+
print("\n--- ANALYSE DER ERSTEN 20 KARTEN ---\n")
5151

5252
found = False
5353
for i, note in enumerate(notes):

config/maps/plugins/bible_search/de-DE/FUZZY_MAP_pre.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,19 +209,19 @@
209209
# now experimental more agressiv search (this maybe overwites other plugins) (S.11.11.'25 09:13 Tue)
210210

211211
# EXAMPLE: Ruth kapitel 123 Vers 123
212-
('bible suche', fr'^(i\w+ )?(?P<book>\w*[ ]?\w+) kapitel (?P<chapter>\d+) [vfdph]\w+ (?P<verse>\d+)$', 90, {
212+
('bible suche', r'^(i\w+ )?(?P<book>\w*[ ]?\w+) kapitel (?P<chapter>\d+) [vfdph]\w+ (?P<verse>\d+)$', 90, {
213213
'flags': re.IGNORECASE,
214214
'on_match_exec': [CONFIG_DIR / 'bible_search.py']
215215
}),
216216

217217
# EXAMPLE: Ruth text kapitel 123 123 Vers
218-
('bible suche', fr'^(i\w+ )?(?P<book>\w*\s*\w+) kapitel (?P<chapter>\d+) (?P<verse>\d+) [vfdph]\w+$', 90, {
218+
('bible suche', r'^(i\w+ )?(?P<book>\w*\s*\w+) kapitel (?P<chapter>\d+) (?P<verse>\d+) [vfdph]\w+$', 90, {
219219
'flags': re.IGNORECASE,
220220
'on_match_exec': [CONFIG_DIR / 'bible_search.py']
221221
}),
222222

223223
# EXAMPLE: Ruth 123 kapitel 123 Vers
224-
('bible suche', fr'^(i\w+ )?(?P<book>\w*\s*\w+) (?P<chapter>\d+) kapitel (?P<verse>\d+) [vfdph]\w+$', 90, {
224+
('bible suche', r'^(i\w+ )?(?P<book>\w*\s*\w+) (?P<chapter>\d+) kapitel (?P<verse>\d+) [vfdph]\w+$', 90, {
225225
'flags': re.IGNORECASE,
226226
'on_match_exec': [CONFIG_DIR / 'bible_search.py']
227227
}),
@@ -239,12 +239,12 @@
239239

240240

241241
# EXAMPLE: Ruth 123 123 Vers
242-
('bible suche', fr'^(i\w+ )?(?P<book>\w*\s*\w+) (?P<chapter>\d+) (?P<verse>\d+) [vfdph]\w+$', 90, {
242+
('bible suche', r'^(i\w+ )?(?P<book>\w*\s*\w+) (?P<chapter>\d+) (?P<verse>\d+) [vfdph]\w+$', 90, {
243243
'flags': re.IGNORECASE,
244244
'on_match_exec': [CONFIG_DIR / 'bible_search.py']
245245
}),
246246
# EXAMPLE: Was Ruth 1 1 Vers
247-
('bible suche', fr'^(i\w+ )?(?P<book>\w*\s*\w+) (?P<chapter>\d+) (?P<verse>\d+) [vfdph]\w+$', 90, {
247+
('bible suche', r'^(i\w+ )?(?P<book>\w*\s*\w+) (?P<chapter>\d+) (?P<verse>\d+) [vfdph]\w+$', 90, {
248248
'flags': re.IGNORECASE,
249249
'on_match_exec': [CONFIG_DIR / 'bible_search.py']
250250
}),

config/maps/plugins/git/de-DE/FUZZY_MAP_pre.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,30 @@
2525

2626

2727
# EXAMPLE: no verify
28-
('n --no-verify', rf'^(no|nur|nö|nur|novell|Numeri) (frei|verify|fall|very far|fein)$', 80, {'flags': re.IGNORECASE}),
28+
('n --no-verify', r'^(no|nur|nö|nur|novell|Numeri) (frei|verify|fall|very far|fein)$', 80, {'flags': re.IGNORECASE}),
2929

3030
#no-verifyno-verifyl --no-verifyNumeri fein
3131

3232

3333
# EXAMPLE: b punkt chemnitz b
34-
('PUNCTUATION_MAP ', rf'\b(punkt chemnitz)\b', 80, {'flags': re.IGNORECASE}),
34+
('PUNCTUATION_MAP ', r'\b(punkt chemnitz)\b', 80, {'flags': re.IGNORECASE}),
3535

3636
# EXAMPLE: git commit
3737
('git commit ', rf'^\s*{gitGit}\s+{commitGit}\s*$', 80, {'flags': re.IGNORECASE}),
3838

3939
# happens very seldem :D 18.11.'25 17:53 Tue
4040
# EXAMPLE: Quarzwerk gibt komm Mitmensch
41-
('git commit message ', rf'\bQuarzwerk gibt komm Mitmensch\b ', 80, {'flags': re.IGNORECASE}),
41+
('git commit message ', r'\bQuarzwerk gibt komm Mitmensch\b ', 80, {'flags': re.IGNORECASE}),
4242

4343

4444
# EXAMPLE: gibt kaum mit
45-
('git commit ', rf'\bgibt kaum mit\w*', 80, {'flags': re.IGNORECASE}),
45+
('git commit ', r'\bgibt kaum mit\w*', 80, {'flags': re.IGNORECASE}),
4646

4747
# EXAMPLE: git commit
48-
('git commit ', rf'\bgit commit\b\s*', 80, {'flags': re.IGNORECASE}),
48+
('git commit ', r'\bgit commit\b\s*', 80, {'flags': re.IGNORECASE}),
4949

5050
# EXAMPLE: git commit
51-
('git commit ', rf'\bgittern komet\b\s*', 80, {'flags': re.IGNORECASE}),
51+
('git commit ', r'\bgittern komet\b\s*', 80, {'flags': re.IGNORECASE}),
5252

5353
# EXAMPLE: git commit Text in english
5454
('git commit Text in english', rf'\bein {gitGit}\b\s*\b{commitGit} text in english\b', 80, {'flags': re.IGNORECASE}),
@@ -171,11 +171,11 @@
171171
#git add . && git commit -m "WIP" && git push; && git
172172

173173
# EXAMPLE: git WIP push
174-
(f'!git add . && git commit -m "WIP" && git push', r'^\s*(git|geht[^\s]*|geh|gitter|Gitta|kate|käthe|kitte|fiat|mit)\s+(add|at|tat|dad|hat|duett|rutsch|es|jetzt|App)\s*(quick|schnell|dirty|wip)?\s*$', 82, {'flags': re.IGNORECASE}),
174+
('!git add . && git commit -m "WIP" && git push', r'^\s*(git|geht[^\s]*|geh|gitter|Gitta|kate|käthe|kitte|fiat|mit)\s+(add|at|tat|dad|hat|duett|rutsch|es|jetzt|App)\s*(quick|schnell|dirty|wip)?\s*$', 82, {'flags': re.IGNORECASE}),
175175

176176

177177
# EXAMPLE: git WIP push
178-
(f'!git add . && git commit -m "WIP" && git push; && git ', r'^\s*(git|geht[^\s]*|geh|gitter|Gitta|kate|käthe|kitte|fiat|mit)\s*(quick|schnell|dirty|wip)?\s*$', 82, {'flags': re.IGNORECASE}),
178+
('!git add . && git commit -m "WIP" && git push; && git ', r'^\s*(git|geht[^\s]*|geh|gitter|Gitta|kate|käthe|kitte|fiat|mit)\s*(quick|schnell|dirty|wip)?\s*$', 82, {'flags': re.IGNORECASE}),
179179
############################################
180180

181181
# (f'cd {CONFIG_DIR}/../../../../../; !git add . && git commit -m "WIP" && git push', r'^\s*(git|geht[^\s]*|geh|gitter|Gitta|kate|käthe|kitte|fiat|mit)\s+(add|at|tat|dad|hat|duett|rutsch|es|jetzt|App)\s*(quick|schnell|dirty|wip)?\s*$', 82, {'flags': re.IGNORECASE}),

0 commit comments

Comments
 (0)