From c06740b144b998457a7f10231d20d1617da15b50 Mon Sep 17 00:00:00 2001 From: saces Date: Wed, 11 Mar 2026 22:06:44 +0100 Subject: [PATCH] license headers (& minor misc fixes) --- .gitignore | 1 + libmxclient/determinant/mxpassfile/mxpassfile.go | 2 ++ .../determinant/mxpassfile/mxpassfile_test.go | 3 +++ libmxclient/determinant/mxpassfile/readpassfile.go | 4 +++- .../determinant/mxpassfile/readpassfile_unix.go | 4 +++- libmxclient/mxapi/discover.go | 2 ++ libmxclient/mxapi/login.go | 2 ++ pygomx/build_ffi.py | 5 +++-- pygomx/setup.py | 2 ++ pygomx/src/pygomx/client.py | 5 ++--- pygomx/src/pygomx/errors.py | 3 ++- pygomx/src/pygomx/simple/client.py | 3 ++- smal/.gitignore | 1 + smal/src/demobot/__init__.py | 1 - smal/src/demobot/__main__.py | 2 ++ smal/src/demobot/demobot.py | 2 ++ smal/src/demobot/simple/__init__.py | 1 - smal/src/demobot/simple/__main__.py | 2 ++ smal/src/demobot/simple/demobot.py | 2 ++ smal/src/pymxutils/mxutils/accountinfo.py | 2 ++ smal/src/pymxutils/mxutils/clearaccount.py | 2 ++ smal/src/pymxutils/mxutils/discoverhs.py | 2 ++ smal/src/pymxutils/mxutils/mktoken.py | 2 ++ smal/src/pymxutils/mxutils/serverinfo.py | 2 ++ smal/src/pymxutils/mxutils/whoami.py | 2 ++ smal/src/smal/app.py | 4 ++-- smal/src/smal/bot.py | 3 ++- smal/src/smal/errors.py | 13 ------------- smal/src/smal/simple/app.py | 4 ++-- smal/src/smal/simple/bot.py | 3 ++- smal/src/smal/smalsetup/__main__.py | 2 ++ smal/src/smal/smalsetup/smalsetup.py | 2 ++ 32 files changed, 60 insertions(+), 30 deletions(-) delete mode 100644 smal/src/smal/errors.py diff --git a/.gitignore b/.gitignore index 4162c6e..3fdf086 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .venv compose.override.yaml work +dist diff --git a/libmxclient/determinant/mxpassfile/mxpassfile.go b/libmxclient/determinant/mxpassfile/mxpassfile.go index 6491b8e..6ea2652 100644 --- a/libmxclient/determinant/mxpassfile/mxpassfile.go +++ b/libmxclient/determinant/mxpassfile/mxpassfile.go @@ -1,3 +1,5 @@ +// Copyright (C) 2026 saces@c-base.org +// SPDX-License-Identifier: AGPL-3.0-only package mxpassfile import ( diff --git a/libmxclient/determinant/mxpassfile/mxpassfile_test.go b/libmxclient/determinant/mxpassfile/mxpassfile_test.go index 6056ab8..a44e630 100644 --- a/libmxclient/determinant/mxpassfile/mxpassfile_test.go +++ b/libmxclient/determinant/mxpassfile/mxpassfile_test.go @@ -1,3 +1,6 @@ +// Copyright (C) 2026 saces@c-base.org +// SPDX-License-Identifier: AGPL-3.0-only + package mxpassfile import ( diff --git a/libmxclient/determinant/mxpassfile/readpassfile.go b/libmxclient/determinant/mxpassfile/readpassfile.go index ee8975b..8985383 100644 --- a/libmxclient/determinant/mxpassfile/readpassfile.go +++ b/libmxclient/determinant/mxpassfile/readpassfile.go @@ -1,5 +1,7 @@ +// Copyright (C) 2026 saces@c-base.org +// SPDX-License-Identifier: AGPL-3.0-only + //go:build windows -// +build windows package mxpassfile diff --git a/libmxclient/determinant/mxpassfile/readpassfile_unix.go b/libmxclient/determinant/mxpassfile/readpassfile_unix.go index b3e3c80..9908db9 100644 --- a/libmxclient/determinant/mxpassfile/readpassfile_unix.go +++ b/libmxclient/determinant/mxpassfile/readpassfile_unix.go @@ -1,5 +1,7 @@ +// Copyright (C) 2026 saces@c-base.org +// SPDX-License-Identifier: AGPL-3.0-only + //go:build !windows -// +build !windows package mxpassfile diff --git a/libmxclient/mxapi/discover.go b/libmxclient/mxapi/discover.go index fe5174b..d5096d2 100644 --- a/libmxclient/mxapi/discover.go +++ b/libmxclient/mxapi/discover.go @@ -1,3 +1,5 @@ +// Copyright (C) 2026 saces@c-base.org +// SPDX-License-Identifier: AGPL-3.0-only package mxapi import ( diff --git a/libmxclient/mxapi/login.go b/libmxclient/mxapi/login.go index bb5f41c..f7af283 100644 --- a/libmxclient/mxapi/login.go +++ b/libmxclient/mxapi/login.go @@ -1,3 +1,5 @@ +// Copyright (C) 2026 saces@c-base.org +// SPDX-License-Identifier: AGPL-3.0-only package mxapi import ( diff --git a/pygomx/build_ffi.py b/pygomx/build_ffi.py index 5e0d938..8c5863a 100644 --- a/pygomx/build_ffi.py +++ b/pygomx/build_ffi.py @@ -1,6 +1,7 @@ -#!/usr/bin/python +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import os -import sys + from cffi import FFI lib_list = [ diff --git a/pygomx/setup.py b/pygomx/setup.py index d3b1f7d..0a33777 100644 --- a/pygomx/setup.py +++ b/pygomx/setup.py @@ -1,3 +1,5 @@ +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import os import subprocess diff --git a/pygomx/src/pygomx/client.py b/pygomx/src/pygomx/client.py index aefc67f..4d79db6 100644 --- a/pygomx/src/pygomx/client.py +++ b/pygomx/src/pygomx/client.py @@ -1,6 +1,5 @@ -# -*- coding: utf-8 -*- - - +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import json import logging diff --git a/pygomx/src/pygomx/errors.py b/pygomx/src/pygomx/errors.py index f8f1a99..73c1c08 100644 --- a/pygomx/src/pygomx/errors.py +++ b/pygomx/src/pygomx/errors.py @@ -1,4 +1,5 @@ -# -*- coding: utf-8 -*- +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only from _pygomx import ffi, lib import json diff --git a/pygomx/src/pygomx/simple/client.py b/pygomx/src/pygomx/simple/client.py index 11977f2..160467f 100644 --- a/pygomx/src/pygomx/simple/client.py +++ b/pygomx/src/pygomx/simple/client.py @@ -1,4 +1,5 @@ -# -*- coding: utf-8 -*- +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import json import logging diff --git a/smal/.gitignore b/smal/.gitignore index bee8a64..3fafd07 100644 --- a/smal/.gitignore +++ b/smal/.gitignore @@ -1 +1,2 @@ __pycache__ +*.egg-info diff --git a/smal/src/demobot/__init__.py b/smal/src/demobot/__init__.py index 8cf9cb3..e69de29 100644 --- a/smal/src/demobot/__init__.py +++ b/smal/src/demobot/__init__.py @@ -1 +0,0 @@ -from .demobot import main diff --git a/smal/src/demobot/__main__.py b/smal/src/demobot/__main__.py index 40ba55d..c2b7e1f 100644 --- a/smal/src/demobot/__main__.py +++ b/smal/src/demobot/__main__.py @@ -1,3 +1,5 @@ +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import sys from .demobot import main diff --git a/smal/src/demobot/demobot.py b/smal/src/demobot/demobot.py index b1afbc1..80a550c 100644 --- a/smal/src/demobot/demobot.py +++ b/smal/src/demobot/demobot.py @@ -1,3 +1,5 @@ +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import logging from smal.bot import SMALBot diff --git a/smal/src/demobot/simple/__init__.py b/smal/src/demobot/simple/__init__.py index 8cf9cb3..e69de29 100644 --- a/smal/src/demobot/simple/__init__.py +++ b/smal/src/demobot/simple/__init__.py @@ -1 +0,0 @@ -from .demobot import main diff --git a/smal/src/demobot/simple/__main__.py b/smal/src/demobot/simple/__main__.py index 40ba55d..c2b7e1f 100644 --- a/smal/src/demobot/simple/__main__.py +++ b/smal/src/demobot/simple/__main__.py @@ -1,3 +1,5 @@ +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import sys from .demobot import main diff --git a/smal/src/demobot/simple/demobot.py b/smal/src/demobot/simple/demobot.py index 069cf93..d059f12 100644 --- a/smal/src/demobot/simple/demobot.py +++ b/smal/src/demobot/simple/demobot.py @@ -1,3 +1,5 @@ +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import logging from smal.simple.bot import SMALBot diff --git a/smal/src/pymxutils/mxutils/accountinfo.py b/smal/src/pymxutils/mxutils/accountinfo.py index c456628..22b3504 100644 --- a/smal/src/pymxutils/mxutils/accountinfo.py +++ b/smal/src/pymxutils/mxutils/accountinfo.py @@ -1,3 +1,5 @@ +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import sys from _pygomx import lib, ffi diff --git a/smal/src/pymxutils/mxutils/clearaccount.py b/smal/src/pymxutils/mxutils/clearaccount.py index d8cf003..0571695 100644 --- a/smal/src/pymxutils/mxutils/clearaccount.py +++ b/smal/src/pymxutils/mxutils/clearaccount.py @@ -1,3 +1,5 @@ +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import sys from _pygomx import lib, ffi diff --git a/smal/src/pymxutils/mxutils/discoverhs.py b/smal/src/pymxutils/mxutils/discoverhs.py index c448492..a422cf7 100644 --- a/smal/src/pymxutils/mxutils/discoverhs.py +++ b/smal/src/pymxutils/mxutils/discoverhs.py @@ -1,3 +1,5 @@ +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import sys from _pygomx import lib, ffi import click diff --git a/smal/src/pymxutils/mxutils/mktoken.py b/smal/src/pymxutils/mxutils/mktoken.py index 27b0d7d..f6fe40a 100644 --- a/smal/src/pymxutils/mxutils/mktoken.py +++ b/smal/src/pymxutils/mxutils/mktoken.py @@ -1,3 +1,5 @@ +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import sys from _pygomx import lib, ffi diff --git a/smal/src/pymxutils/mxutils/serverinfo.py b/smal/src/pymxutils/mxutils/serverinfo.py index 7a64535..82eaec8 100644 --- a/smal/src/pymxutils/mxutils/serverinfo.py +++ b/smal/src/pymxutils/mxutils/serverinfo.py @@ -1,3 +1,5 @@ +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import sys from _pygomx import lib, ffi diff --git a/smal/src/pymxutils/mxutils/whoami.py b/smal/src/pymxutils/mxutils/whoami.py index 7863cb5..3fa6cfa 100644 --- a/smal/src/pymxutils/mxutils/whoami.py +++ b/smal/src/pymxutils/mxutils/whoami.py @@ -1,3 +1,5 @@ +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import sys from _pygomx import lib, ffi diff --git a/smal/src/smal/app.py b/smal/src/smal/app.py index 7a4813b..bbd435d 100644 --- a/smal/src/smal/app.py +++ b/smal/src/smal/app.py @@ -1,5 +1,5 @@ -# -*- coding: utf-8 -*- - +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import logging import asyncio diff --git a/smal/src/smal/bot.py b/smal/src/smal/bot.py index 1921f4e..0b1e6fa 100644 --- a/smal/src/smal/bot.py +++ b/smal/src/smal/bot.py @@ -1,4 +1,5 @@ -# -*- coding: utf-8 -*- +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import logging from .app import SMALApp diff --git a/smal/src/smal/errors.py b/smal/src/smal/errors.py deleted file mode 100644 index 38ca664..0000000 --- a/smal/src/smal/errors.py +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- - - -class APIError(Exception): - """Exception raised for api usage errors. - - Attributes: - message -- explanation of the error - """ - - def __init__(self, message): - self.message = message[4:] - super().__init__(self.message) diff --git a/smal/src/smal/simple/app.py b/smal/src/smal/simple/app.py index abfb8a1..0f67d2c 100644 --- a/smal/src/smal/simple/app.py +++ b/smal/src/smal/simple/app.py @@ -1,5 +1,5 @@ -# -*- coding: utf-8 -*- - +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import logging from pygomx.simple import _SimpleClient diff --git a/smal/src/smal/simple/bot.py b/smal/src/smal/simple/bot.py index 85e2db4..0d646f8 100644 --- a/smal/src/smal/simple/bot.py +++ b/smal/src/smal/simple/bot.py @@ -1,4 +1,5 @@ -# -*- coding: utf-8 -*- +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import logging from .app import SMALApp diff --git a/smal/src/smal/smalsetup/__main__.py b/smal/src/smal/smalsetup/__main__.py index 9997fe1..0829d78 100644 --- a/smal/src/smal/smalsetup/__main__.py +++ b/smal/src/smal/smalsetup/__main__.py @@ -1,3 +1,5 @@ +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import sys from .smalsetup import smalsetup diff --git a/smal/src/smal/smalsetup/smalsetup.py b/smal/src/smal/smalsetup/smalsetup.py index d6ba183..7f3431a 100644 --- a/smal/src/smal/smalsetup/smalsetup.py +++ b/smal/src/smal/smalsetup/smalsetup.py @@ -1,3 +1,5 @@ +# Copyright (C) 2026 saces@c-base.org +# SPDX-License-Identifier: AGPL-3.0-only import sys import os import getpass