From baa89722cf7ab3b627944ebd644f409bfd0fd8d0 Mon Sep 17 00:00:00 2001 From: Haoxiang Fei Date: Sat, 8 Nov 2025 14:04:52 +0800 Subject: [PATCH 1/3] feat(ci): add licenserc.toml for license checking --- licenserc.toml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 licenserc.toml diff --git a/licenserc.toml b/licenserc.toml new file mode 100644 index 0000000..5274b73 --- /dev/null +++ b/licenserc.toml @@ -0,0 +1,39 @@ +# Copyright 2025 International Digital Economy Academy +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Configuration file for the "license header checker github action" [HawkEye](https://github.com/marketplace/actions/hawkeye-action) +# For detailed configuration, see https://github.com/korandoru/hawkeye?tab=readme-ov-file#configurations + +# https://github.com/korandoru/hawkeye/blob/badc166be6ed1a2f6c5cdff6422f8b1cf597dfe6/fmt/src/license/Apache-2.0.txt +inlineHeader = ''' +Copyright {{ attrs.git_file_modified_year }} International Digital Economy Academy + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +''' + +includes = ["*.mbt"] + +[git] +ignore = 'auto' +attrs = 'enable' \ No newline at end of file From 6446801217436f5a28e3d45c68cb306c41c4396a Mon Sep 17 00:00:00 2001 From: Haoxiang Fei Date: Sat, 8 Nov 2025 14:06:58 +0800 Subject: [PATCH 2/3] chore: add license header to source files --- bool.mbt | 14 ++++++++++++++ callable.mbt | 14 ++++++++++++++ cpython/abstract.mbt | 14 ++++++++++++++ cpython/cell.mbt | 14 ++++++++++++++ cpython/ceval.mbt | 14 ++++++++++++++ cpython/class.mbt | 14 ++++++++++++++ cpython/code.mbt | 14 ++++++++++++++ cpython/codecs.mbt | 14 ++++++++++++++ cpython/context.mbt | 14 ++++++++++++++ cpython/core.mbt | 14 ++++++++++++++ cpython/dict.mbt | 14 ++++++++++++++ cpython/error.mbt | 14 ++++++++++++++ cpython/file.mbt | 14 ++++++++++++++ cpython/func.mbt | 14 ++++++++++++++ cpython/import.mbt | 14 ++++++++++++++ cpython/iter.mbt | 14 ++++++++++++++ cpython/lifecycle.mbt | 14 ++++++++++++++ cpython/list.mbt | 14 ++++++++++++++ cpython/module.mbt | 14 ++++++++++++++ cpython/number.mbt | 14 ++++++++++++++ cpython/object.mbt | 14 ++++++++++++++ cpython/odict.mbt | 14 ++++++++++++++ cpython/set.mbt | 14 ++++++++++++++ cpython/tuple.mbt | 14 ++++++++++++++ cpython/unicode.mbt | 14 ++++++++++++++ cpython/utils.mbt | 14 ++++++++++++++ dict.mbt | 14 ++++++++++++++ enums.mbt | 14 ++++++++++++++ errors.mbt | 14 ++++++++++++++ float.mbt | 14 ++++++++++++++ integer.mbt | 14 ++++++++++++++ list.mbt | 14 ++++++++++++++ main/main.mbt | 14 ++++++++++++++ module.mbt | 14 ++++++++++++++ obj.mbt | 14 ++++++++++++++ set.mbt | 13 +++++++++++++ str.mbt | 14 ++++++++++++++ test/module_test.mbt | 14 ++++++++++++++ test/object_test.mbt | 14 ++++++++++++++ time/lib.mbt | 14 ++++++++++++++ tkinter/tkinter.mbt | 14 ++++++++++++++ traits.mbt | 14 ++++++++++++++ tuple.mbt | 14 ++++++++++++++ turtle/color.mbt | 14 ++++++++++++++ turtle/lib.mbt | 14 ++++++++++++++ turtle/pen.mbt | 14 ++++++++++++++ turtle/pen2.mbt | 14 ++++++++++++++ turtle/screen.mbt | 14 ++++++++++++++ turtle/shape.mbt | 14 ++++++++++++++ turtle/speed.mbt | 14 ++++++++++++++ utils.mbt | 14 ++++++++++++++ 51 files changed, 713 insertions(+) diff --git a/bool.mbt b/bool.mbt index ec9cef7..9b0d72e 100644 --- a/bool.mbt +++ b/bool.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // ======================================== // PyBool // ======================================== diff --git a/callable.mbt b/callable.mbt index f105417..6003a93 100644 --- a/callable.mbt +++ b/callable.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // ======================================== // Function // ======================================== diff --git a/cpython/abstract.mbt b/cpython/abstract.mbt index 2fbe15a..3f62986 100644 --- a/cpython/abstract.mbt +++ b/cpython/abstract.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Abstract ///| Call a callable Python object 'callable' with arguments given by the diff --git a/cpython/cell.mbt b/cpython/cell.mbt index 4b75abc..1151243 100644 --- a/cpython/cell.mbt +++ b/cpython/cell.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // cell ///| diff --git a/cpython/ceval.mbt b/cpython/ceval.mbt index 73818e5..10cf17a 100644 --- a/cpython/ceval.mbt +++ b/cpython/ceval.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // ceval ///| diff --git a/cpython/class.mbt b/cpython/class.mbt index 1651d32..8fe1afa 100644 --- a/cpython/class.mbt +++ b/cpython/class.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // class ///| diff --git a/cpython/code.mbt b/cpython/code.mbt index db33590..a82f95b 100644 --- a/cpython/code.mbt +++ b/cpython/code.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // code ///| diff --git a/cpython/codecs.mbt b/cpython/codecs.mbt index 831198e..9936481 100644 --- a/cpython/codecs.mbt +++ b/cpython/codecs.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // code cs ///| diff --git a/cpython/context.mbt b/cpython/context.mbt index efee81e..d63e6fc 100644 --- a/cpython/context.mbt +++ b/cpython/context.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // context ///| diff --git a/cpython/core.mbt b/cpython/core.mbt index 749f46a..e51bff3 100644 --- a/cpython/core.mbt +++ b/cpython/core.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| type CStr // const char* diff --git a/cpython/dict.mbt b/cpython/dict.mbt index 98bf824..d21556b 100644 --- a/cpython/dict.mbt +++ b/cpython/dict.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // dict ///| diff --git a/cpython/error.mbt b/cpython/error.mbt index 7e03ede..7493ee9 100644 --- a/cpython/error.mbt +++ b/cpython/error.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| pub extern "C" fn py_err_occurred() -> PyObjectRef = "PyErr_Occurred" diff --git a/cpython/file.mbt b/cpython/file.mbt index b328c8d..15197ff 100644 --- a/cpython/file.mbt +++ b/cpython/file.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // File ///| diff --git a/cpython/func.mbt b/cpython/func.mbt index 258794b..5f08fb8 100644 --- a/cpython/func.mbt +++ b/cpython/func.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Func Object ///| diff --git a/cpython/import.mbt b/cpython/import.mbt index 6286d8c..5fc31e5 100644 --- a/cpython/import.mbt +++ b/cpython/import.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Import ///| diff --git a/cpython/iter.mbt b/cpython/iter.mbt index 1687705..cfd5b76 100644 --- a/cpython/iter.mbt +++ b/cpython/iter.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Iter ///| diff --git a/cpython/lifecycle.mbt b/cpython/lifecycle.mbt index 52e4ce3..66e2148 100644 --- a/cpython/lifecycle.mbt +++ b/cpython/lifecycle.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| pub extern "C" fn py_init() = "Py_Initialize" diff --git a/cpython/list.mbt b/cpython/list.mbt index 72de4a0..65d29b9 100644 --- a/cpython/list.mbt +++ b/cpython/list.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // List ///| diff --git a/cpython/module.mbt b/cpython/module.mbt index 55f9743..092f202 100644 --- a/cpython/module.mbt +++ b/cpython/module.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Module ///| diff --git a/cpython/number.mbt b/cpython/number.mbt index c28383f..4236f5e 100644 --- a/cpython/number.mbt +++ b/cpython/number.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // PyObjectRef PyBool_FromLong(long); ///| diff --git a/cpython/object.mbt b/cpython/object.mbt index 029e241..480d7a9 100644 --- a/cpython/object.mbt +++ b/cpython/object.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| #owned(a) pub extern "C" fn py_object_repr(a : PyObjectRef) -> PyObjectRef = "PyObject_Repr" diff --git a/cpython/odict.mbt b/cpython/odict.mbt index 21bb9f1..6bf9656 100644 --- a/cpython/odict.mbt +++ b/cpython/odict.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // ODict ///| diff --git a/cpython/set.mbt b/cpython/set.mbt index 4429686..46475c2 100644 --- a/cpython/set.mbt +++ b/cpython/set.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Set ///| diff --git a/cpython/tuple.mbt b/cpython/tuple.mbt index b76492f..325018d 100644 --- a/cpython/tuple.mbt +++ b/cpython/tuple.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Tuple ///| diff --git a/cpython/unicode.mbt b/cpython/unicode.mbt index 6ae7872..fe0b87f 100644 --- a/cpython/unicode.mbt +++ b/cpython/unicode.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Unicode ///| diff --git a/cpython/utils.mbt b/cpython/utils.mbt index 392c6ab..da3f44e 100644 --- a/cpython/utils.mbt +++ b/cpython/utils.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| priv trait ToCStr { to_cstr(Self) -> Bytes diff --git a/dict.mbt b/dict.mbt index 50e4d35..1dce5cf 100644 --- a/dict.mbt +++ b/dict.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // ======================================== // Dict // ======================================== diff --git a/enums.mbt b/enums.mbt index 31f7af5..019b993 100644 --- a/enums.mbt +++ b/enums.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| pub enum PyType { PyInteger diff --git a/errors.mbt b/errors.mbt index b59613c..484d31b 100644 --- a/errors.mbt +++ b/errors.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| pub suberror PyRuntimeError { TypeMisMatchError diff --git a/float.mbt b/float.mbt index ba2e904..308c7b9 100644 --- a/float.mbt +++ b/float.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| pub struct PyFloat { priv obj : PyObject diff --git a/integer.mbt b/integer.mbt index b36be88..e857c02 100644 --- a/integer.mbt +++ b/integer.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // ======================================== // PyInteger // ======================================== diff --git a/list.mbt b/list.mbt index 213dc1d..aabe0ae 100644 --- a/list.mbt +++ b/list.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // ======================================== // py_list // ======================================== diff --git a/main/main.mbt b/main/main.mbt index 265c8c8..b794b6a 100644 --- a/main/main.mbt +++ b/main/main.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| typealias @python.(PyInteger, PyList, PyTuple) diff --git a/module.mbt b/module.mbt index ed8ba6b..a7cf09d 100644 --- a/module.mbt +++ b/module.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // ======================================== // Import // ======================================== diff --git a/obj.mbt b/obj.mbt index ba62b98..52d36ac 100644 --- a/obj.mbt +++ b/obj.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| pub struct PyObject { priv obj : @cpython.PyObjectRef diff --git a/set.mbt b/set.mbt index 8b13789..fa84495 100644 --- a/set.mbt +++ b/set.mbt @@ -1 +1,14 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. diff --git a/str.mbt b/str.mbt index 39dd5ea..55c9e06 100644 --- a/str.mbt +++ b/str.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // ======================================== // PyString // ======================================== diff --git a/test/module_test.mbt b/test/module_test.mbt index 06faf54..0a08d06 100644 --- a/test/module_test.mbt +++ b/test/module_test.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| test "Module Test" { let os = @python.pyimport("os", print_err=true) diff --git a/test/object_test.mbt b/test/object_test.mbt index 912be8f..3a7b795 100644 --- a/test/object_test.mbt +++ b/test/object_test.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| typealias @python.( PyInteger, diff --git a/time/lib.mbt b/time/lib.mbt index e3966dc..de5c732 100644 --- a/time/lib.mbt +++ b/time/lib.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| typealias @python.(PyModule, PyTuple, PyFloat) diff --git a/tkinter/tkinter.mbt b/tkinter/tkinter.mbt index e573d1e..631222d 100644 --- a/tkinter/tkinter.mbt +++ b/tkinter/tkinter.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Example //typealias Window = @tkinter.Window //typealias Label = @tkinter.Label diff --git a/traits.mbt b/traits.mbt index f1b8257..d15a85b 100644 --- a/traits.mbt +++ b/traits.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| pub trait IsPyObject { obj(Self) -> PyObject diff --git a/tuple.mbt b/tuple.mbt index 5847804..db10af6 100644 --- a/tuple.mbt +++ b/tuple.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // ======================================== // Tuple // ======================================== diff --git a/turtle/color.mbt b/turtle/color.mbt index 1ebc64e..8616e0c 100644 --- a/turtle/color.mbt +++ b/turtle/color.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| Represents common colors used for drawing. /// Deriving Show provides a default to_string() which can be converted to lowercase for Python. pub(all) enum Color { diff --git a/turtle/lib.mbt b/turtle/lib.mbt index 4a1ec3f..379d77e 100644 --- a/turtle/lib.mbt +++ b/turtle/lib.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| typealias @python.( PyModule, diff --git a/turtle/pen.mbt b/turtle/pen.mbt index de37106..10b2140 100644 --- a/turtle/pen.mbt +++ b/turtle/pen.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + /////| //pub struct Pen { // priv pen : PyObject diff --git a/turtle/pen2.mbt b/turtle/pen2.mbt index 35a69f4..4bafa7a 100644 --- a/turtle/pen2.mbt +++ b/turtle/pen2.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| Represents a turtle pen object, capable of drawing on the screen. /// corresponds to `turtle.Pen` or the default turtle instance in Python. pub struct Pen { diff --git a/turtle/screen.mbt b/turtle/screen.mbt index b7cb671..c31c6af 100644 --- a/turtle/screen.mbt +++ b/turtle/screen.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| pub struct Screen { priv screen : PyObject diff --git a/turtle/shape.mbt b/turtle/shape.mbt index 893773a..bca278e 100644 --- a/turtle/shape.mbt +++ b/turtle/shape.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| Represents common shapes for the turtle cursor. /// Deriving Show provides a default to_string() which can be converted to lowercase for Python. pub(all) enum Shape { diff --git a/turtle/speed.mbt b/turtle/speed.mbt index 6e0b185..1c443c5 100644 --- a/turtle/speed.mbt +++ b/turtle/speed.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| pub(all) enum Speed { Fastest diff --git a/utils.mbt b/utils.mbt index 364c711..9612bc6 100644 --- a/utils.mbt +++ b/utils.mbt @@ -1,3 +1,17 @@ +// Copyright 2025 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + ///| fn[T] unless(cond : Bool, value : () -> T) -> T? { if !cond { From ba65723d0a83a43275852a242ceee0686e937b03 Mon Sep 17 00:00:00 2001 From: Haoxiang Fei Date: Sat, 8 Nov 2025 14:17:05 +0800 Subject: [PATCH 3/3] fix(licenserc): update hawkeye version --- .github/workflows/check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index c4405d6..88c8059 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -83,7 +83,7 @@ jobs: license-header-check: runs-on: ubuntu-latest env: - HAWKEYE_VERSION: v5.8.1 + HAWKEYE_VERSION: v6.3.0 steps: - uses: actions/checkout@v4 with: