Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -10,18 +10,18 @@ repos:
hooks:
- id: python-check-blanket-noqa

- repo: https://github.com/psf/black
rev: 24.4.2
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 26.3.1
hooks:
- id: black

- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 9.0.0a3
hooks:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
rev: 7.3.0
hooks:
- id: flake8
additional_dependencies:
Expand Down
6 changes: 2 additions & 4 deletions auto_neutron/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ def get_config_dir() -> Path:
)
STATUS_PATH = JOURNAL_PATH / "Status.json"
ROUTE_FILE_NAME = "route.csv"
AHK_TEMPLATE = Template(
"""\
AHK_TEMPLATE = Template("""\
stdin := FileOpen("*", "r")

${hotkey}::
Expand All @@ -43,8 +42,7 @@ def get_config_dir() -> Path:
system := Trim(stdin.ReadLine(),"`n ")
}
${user_script}
"""
)
""")

AHK_USER_SCRIPT_TEMPLATE = """\
SetKeyDelay, 50, 50
Expand Down
8 changes: 2 additions & 6 deletions auto_neutron/windows/error_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,9 @@ def retranslate(self) -> None:
"Multiple unexpected errors have occurred (x{})"
).format(self._num_errors)

self.error_template = textwrap.dedent(
_(
"""\
self.error_template = textwrap.dedent(_("""\
Please make sure to report the bug by submitting the session log, or at [Github]({issues_url}),
and include the {{file_name}} file from [the log directory]({{log_path}}).\\
You may close this window, but the program may not be fully functional, or it may produce erroneous behaviour.
"""
)
).format(issues_url=ISSUES_URL)
""")).format(issues_url=ISSUES_URL)
self._set_text()
8 changes: 2 additions & 6 deletions auto_neutron/windows/license_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ def get_license_text(self) -> str:
).as_uri()
auto_neutron_license_url = (base_path() / "LICENSE.md").as_uri()

return textwrap.dedent(
_(
"""\
return textwrap.dedent(_("""\
Auto_Neutron Copyright (C) 2019 Numerlor\\
This program comes with ABSOLUTELY NO WARRANTY.\\
This is free software, and you are welcome to redistribute it
Expand All @@ -90,9 +88,7 @@ def get_license_text(self) -> str:
Python is licensed under the {psf_license_agreement_hyperlink}, see {python_licenses_hyperlink} for more details.

And The Breeze Icons Theme Copyright (C) 2014 Uri Herrera <uri_herrera@nitrux.in> and others, licensed under the {breeze_hyperlink}.
"""
)
).format(
""")).format(
auto_neutron_hyperlink=self.make_hyperlink(
_("GPLv3 license"), auto_neutron_license_url
),
Expand Down
3 changes: 2 additions & 1 deletion pyinstaller_build/spec_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Copyright (C) 2022 Numerlor

"""Constants and filter helper functions to be used in spec files."""

from pathlib import Path

from PyInstaller.utils.hooks import collect_data_files
Expand Down Expand Up @@ -63,7 +64,7 @@


def filter_binaries(
to_filter: list[tuple[str, str, str]]
to_filter: list[tuple[str, str, str]],
) -> list[tuple[str, str, str]]:
"""Filter out any binaries that are in DLL_EXCLUDE."""
filtered = []
Expand Down
1 change: 1 addition & 0 deletions pyinstaller_build/svg_to_ico.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Copyright (C) 2022 Numerlor

"""Utility script to convert a svg file into an icon library."""

import argparse
import shutil
import subprocess
Expand Down