Skip to content

Commit 862065a

Browse files
committed
small final changes?
1 parent a40e433 commit 862065a

File tree

7 files changed

+19
-15
lines changed

7 files changed

+19
-15
lines changed

axedit/autocompletions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def spawn_server(self):
8181
while True:
8282
try:
8383
self.server_port = random.randint(1024, 65535)
84-
logger.debug(f"AutoCompletion PORT={self.server_port}")
84+
logger.info(f"AutoCompletion PORT={self.server_port}")
8585
command = [
8686
sys.executable,
8787
str(lang_server_path.absolute()),

axedit/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424

2525
def true_exit():
26-
logger.debug("EXIT CALLED")
26+
logger.info("EXIT CALLED")
2727
write_config()
2828
safe_close_connections()
2929

@@ -44,7 +44,7 @@ def __init__(self) -> None:
4444
shared.linter = Linter()
4545
self.debugger = Debugger()
4646
shared.history = HistoryManager()
47-
logger.debug("CORE INITIALIZED")
47+
logger.info("CORE INITIALIZED")
4848

4949
def win_init(self):
5050
pygame.display.set_caption(shared.APP_NAME)
@@ -58,7 +58,7 @@ def win_init(self):
5858
else:
5959
self.fps = refresh_rate / 2
6060

61-
logger.debug(f"RUNNING AT {self.fps} FPS")
61+
logger.info(f"RUNNING AT {self.fps} FPS")
6262

6363
shared.srect = shared.screen.get_rect()
6464
shared.frame_cache = {}
@@ -103,7 +103,7 @@ def on_ctrl_question(self):
103103
pygame.image.save(shared.screen, Path("/home/axis/p/editor/showcase.png"))
104104
query = "convert ~/p/editor/showcase.png \( +clone -background black -shadow 50x10+15+15 \) +swap -background none -layers merge +repage ~/p/editor/showcase.png"
105105
os.system(query)
106-
logger.debug("Showcased screenshot")
106+
logger.info("Showcased screenshot")
107107

108108
def update(self):
109109
self.shared_frame_refresh()

axedit/first_run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def apply_config():
3232
shared.config = get_config()
3333
shared.FONT_SIZE = shared.config["font"]["size"]
3434
if shared.config["font"]["path"] not in ("default", False):
35-
logger.debug("Applying path font")
35+
logger.info("Applying path font")
3636
shared.FONT = pygame.Font(
3737
shared.config["font"]["path"], shared.config["font"]["size"]
3838
)
@@ -41,7 +41,7 @@ def apply_config():
4141
shared.FONT_HEIGHT = shared.FONT.get_height()
4242

4343
elif shared.config["font"]["family"]:
44-
logger.debug("Apply family font")
44+
logger.info("Apply family font")
4545
shared.FONT = pygame.sysfont.SysFont(
4646
shared.config["font"]["family"], shared.config["font"]["size"]
4747
)

axedit/line_numbers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def update(self):
2828
max_line_digits = len(f"{shared.cursor_pos.y + end_of_page_lno:.0f}")
2929
shared.line_number_digits = max_line_digits + 4
3030

31-
# logger.debug(
31+
# logger.info(
3232
# f"{end_of_page_lno=}, {max_line_digits=}, {shared.line_number_digits=}"
3333
# )
3434

axedit/linter.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def spawn_server(self):
4949
while True:
5050
try:
5151
self.server_port = random.randint(1024, 65535)
52-
logger.debug(f"Linter PORT={self.server_port}")
52+
logger.info(f"Linter PORT={self.server_port}")
5353
command = [
5454
sys.executable,
5555
str(lang_server_path.absolute()),
@@ -175,7 +175,12 @@ def render_squigline(
175175
bound_rect = squiggly_surf.get_bounding_rect()
176176
if shared.config["squiggly"]["type"] == "cut-off":
177177
bound_rect.width = squiggly_bum
178-
squiggly_surf = squiggly_surf.subsurface(bound_rect).copy()
178+
try:
179+
squiggly_surf = squiggly_surf.subsurface(bound_rect).copy()
180+
except ValueError:
181+
logger.debug(bound_rect)
182+
logger.debug(squiggly_bum)
183+
pass
179184

180185
squiggly_rect = pygame.Rect(
181186
(
@@ -187,7 +192,6 @@ def render_squigline(
187192
if shared.config["squiggly"]["type"] == "centered-free":
188193
squiggly_rect = squiggly_surf.get_rect(center=squiggly_rect.center)
189194
else:
190-
...
191195
squiggly_rect.y += shared.FONT_HEIGHT * 0.5
192196
editor_surf.blit(squiggly_surf, squiggly_rect)
193197

axedit/logs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222

2323
class CustomFormatter(logging.Formatter):
2424
COLORS = {
25-
logging.DEBUG: colorama.Fore.GREEN,
26-
logging.INFO: colorama.Fore.WHITE,
25+
logging.DEBUG: colorama.Fore.WHITE,
26+
logging.INFO: colorama.Fore.GREEN,
2727
logging.WARNING: colorama.Fore.YELLOW,
2828
logging.ERROR: colorama.Fore.RED,
2929
logging.CRITICAL: colorama.Fore.MAGENTA,

axedit/modal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def on_percent() -> None:
2222
row: list
2323
try:
2424
start_find = shared.cursor_pos.x + 1 if y_offset == 0 else 0
25-
# logger.debug(f"{"".join(row)=}, {brakies[current_char]=}, {start_find=}")
25+
# logger.info(f"{"".join(row)=}, {brakies[current_char]=}, {start_find=}")
2626

2727
ignore_count = 0
2828
for i, char in enumerate(row[start_find:]):
@@ -56,7 +56,7 @@ def on_percent() -> None:
5656
start_find = shared.cursor_pos.x if y_offset == 0 else len(row)
5757

5858
ignore_count = 0
59-
# logger.debug(row[:start_find][::-1])
59+
# logger.info(row[:start_find][::-1])
6060
for i, char in enumerate(row[:start_find][::-1]):
6161
if char == current_char:
6262
ignore_count += 1

0 commit comments

Comments
 (0)