diff --git a/LICENSE b/LICENSE index f308f8b6..3e1d480e 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2023 Buf Technologies, Inc. + Copyright 2023-2025 Buf Technologies, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Makefile b/Makefile index 8fa32085..e5dce156 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ CONFORMANCE_ARGS ?= --strict --strict_message --expected_failures=tests/conforma ADD_LICENSE_HEADER := $(BIN)/license-header \ --license-type apache \ --copyright-holder "Buf Technologies, Inc." \ - --year-range "2023" + --year-range "2023-2025" PROTOVALIDATE_VERSION ?= v0.10.0 .PHONY: help @@ -35,7 +35,7 @@ generate: $(BIN)/buf $(BIN)/license-header ## Regenerate code and license header rm -rf gen buf generate buf.build/bufbuild/protovalidate:$(PROTOVALIDATE_VERSION) buf generate buf.build/bufbuild/protovalidate-testing:$(PROTOVALIDATE_VERSION) - $(ADD_LICENSE_HEADER) --ignore __init__.py + $(ADD_LICENSE_HEADER) .PHONY: format format: install $(BIN)/license-header ## Format code @@ -58,11 +58,6 @@ lint: install ## Lint code pipenv run ruff check protovalidate tests pipenv verify -.PHONY: lint-fix -lint-fix: install ## Lint code - pipenv run ruff format protovalidate tests - pipenv run ruff check --fix protovalidate tests - .PHONY: install install: ## Install dependencies $(PYTHON) -m pip install --upgrade pip pipenv diff --git a/gen/buf/validate/conformance/cases/bool_pb2.py b/gen/buf/validate/conformance/cases/bool_pb2.py index 04f7adc0..86d58c91 100644 --- a/gen/buf/validate/conformance/cases/bool_pb2.py +++ b/gen/buf/validate/conformance/cases/bool_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/bool_pb2.pyi b/gen/buf/validate/conformance/cases/bool_pb2.pyi index d53a86f5..253b0967 100644 --- a/gen/buf/validate/conformance/cases/bool_pb2.pyi +++ b/gen/buf/validate/conformance/cases/bool_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/bytes_pb2.py b/gen/buf/validate/conformance/cases/bytes_pb2.py index 42c8f2be..dd02362c 100644 --- a/gen/buf/validate/conformance/cases/bytes_pb2.py +++ b/gen/buf/validate/conformance/cases/bytes_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/bytes_pb2.pyi b/gen/buf/validate/conformance/cases/bytes_pb2.pyi index 319705f5..4414fccb 100644 --- a/gen/buf/validate/conformance/cases/bytes_pb2.pyi +++ b/gen/buf/validate/conformance/cases/bytes_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/custom_constraints/custom_constraints_pb2.py b/gen/buf/validate/conformance/cases/custom_constraints/custom_constraints_pb2.py index 3e2a795d..8c1ca0a5 100644 --- a/gen/buf/validate/conformance/cases/custom_constraints/custom_constraints_pb2.py +++ b/gen/buf/validate/conformance/cases/custom_constraints/custom_constraints_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/custom_constraints/custom_constraints_pb2.pyi b/gen/buf/validate/conformance/cases/custom_constraints/custom_constraints_pb2.pyi index cc2ff470..1b7a8ffa 100644 --- a/gen/buf/validate/conformance/cases/custom_constraints/custom_constraints_pb2.pyi +++ b/gen/buf/validate/conformance/cases/custom_constraints/custom_constraints_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/enums_pb2.py b/gen/buf/validate/conformance/cases/enums_pb2.py index c80bf784..d54a031a 100644 --- a/gen/buf/validate/conformance/cases/enums_pb2.py +++ b/gen/buf/validate/conformance/cases/enums_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/enums_pb2.pyi b/gen/buf/validate/conformance/cases/enums_pb2.pyi index 330f14d7..4f6eb993 100644 --- a/gen/buf/validate/conformance/cases/enums_pb2.pyi +++ b/gen/buf/validate/conformance/cases/enums_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/filename_with_dash_pb2.py b/gen/buf/validate/conformance/cases/filename_with_dash_pb2.py index 3459d3f5..a6978e33 100644 --- a/gen/buf/validate/conformance/cases/filename_with_dash_pb2.py +++ b/gen/buf/validate/conformance/cases/filename_with_dash_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/filename_with_dash_pb2.pyi b/gen/buf/validate/conformance/cases/filename_with_dash_pb2.pyi index b92f01b1..82af1abf 100644 --- a/gen/buf/validate/conformance/cases/filename_with_dash_pb2.pyi +++ b/gen/buf/validate/conformance/cases/filename_with_dash_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/ignore_empty_proto2_pb2.py b/gen/buf/validate/conformance/cases/ignore_empty_proto2_pb2.py index 3a913d01..1784abe9 100644 --- a/gen/buf/validate/conformance/cases/ignore_empty_proto2_pb2.py +++ b/gen/buf/validate/conformance/cases/ignore_empty_proto2_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/ignore_empty_proto2_pb2.pyi b/gen/buf/validate/conformance/cases/ignore_empty_proto2_pb2.pyi index d0314f2d..066d77db 100644 --- a/gen/buf/validate/conformance/cases/ignore_empty_proto2_pb2.pyi +++ b/gen/buf/validate/conformance/cases/ignore_empty_proto2_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/ignore_empty_proto3_pb2.py b/gen/buf/validate/conformance/cases/ignore_empty_proto3_pb2.py index d46e4515..c3372108 100644 --- a/gen/buf/validate/conformance/cases/ignore_empty_proto3_pb2.py +++ b/gen/buf/validate/conformance/cases/ignore_empty_proto3_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/ignore_empty_proto3_pb2.pyi b/gen/buf/validate/conformance/cases/ignore_empty_proto3_pb2.pyi index 4e777a78..416137f8 100644 --- a/gen/buf/validate/conformance/cases/ignore_empty_proto3_pb2.pyi +++ b/gen/buf/validate/conformance/cases/ignore_empty_proto3_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/ignore_empty_proto_editions_pb2.py b/gen/buf/validate/conformance/cases/ignore_empty_proto_editions_pb2.py index 358c5371..dc48e8cf 100644 --- a/gen/buf/validate/conformance/cases/ignore_empty_proto_editions_pb2.py +++ b/gen/buf/validate/conformance/cases/ignore_empty_proto_editions_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/ignore_empty_proto_editions_pb2.pyi b/gen/buf/validate/conformance/cases/ignore_empty_proto_editions_pb2.pyi index 789c9588..e02504ad 100644 --- a/gen/buf/validate/conformance/cases/ignore_empty_proto_editions_pb2.pyi +++ b/gen/buf/validate/conformance/cases/ignore_empty_proto_editions_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/ignore_proto2_pb2.py b/gen/buf/validate/conformance/cases/ignore_proto2_pb2.py index 120736f8..966d7724 100644 --- a/gen/buf/validate/conformance/cases/ignore_proto2_pb2.py +++ b/gen/buf/validate/conformance/cases/ignore_proto2_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/ignore_proto2_pb2.pyi b/gen/buf/validate/conformance/cases/ignore_proto2_pb2.pyi index 529cf294..79f8be28 100644 --- a/gen/buf/validate/conformance/cases/ignore_proto2_pb2.pyi +++ b/gen/buf/validate/conformance/cases/ignore_proto2_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/ignore_proto3_pb2.py b/gen/buf/validate/conformance/cases/ignore_proto3_pb2.py index 7a01b479..4c6beb8b 100644 --- a/gen/buf/validate/conformance/cases/ignore_proto3_pb2.py +++ b/gen/buf/validate/conformance/cases/ignore_proto3_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/ignore_proto3_pb2.pyi b/gen/buf/validate/conformance/cases/ignore_proto3_pb2.pyi index 0280053e..5dd8e1d3 100644 --- a/gen/buf/validate/conformance/cases/ignore_proto3_pb2.pyi +++ b/gen/buf/validate/conformance/cases/ignore_proto3_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/ignore_proto_editions_pb2.py b/gen/buf/validate/conformance/cases/ignore_proto_editions_pb2.py index 96a3610c..a50e462a 100644 --- a/gen/buf/validate/conformance/cases/ignore_proto_editions_pb2.py +++ b/gen/buf/validate/conformance/cases/ignore_proto_editions_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/ignore_proto_editions_pb2.pyi b/gen/buf/validate/conformance/cases/ignore_proto_editions_pb2.pyi index 42876197..b8ea323e 100644 --- a/gen/buf/validate/conformance/cases/ignore_proto_editions_pb2.pyi +++ b/gen/buf/validate/conformance/cases/ignore_proto_editions_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/kitchen_sink_pb2.py b/gen/buf/validate/conformance/cases/kitchen_sink_pb2.py index e889a1ad..e3ff2496 100644 --- a/gen/buf/validate/conformance/cases/kitchen_sink_pb2.py +++ b/gen/buf/validate/conformance/cases/kitchen_sink_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/kitchen_sink_pb2.pyi b/gen/buf/validate/conformance/cases/kitchen_sink_pb2.pyi index c88ba4f2..880f4117 100644 --- a/gen/buf/validate/conformance/cases/kitchen_sink_pb2.pyi +++ b/gen/buf/validate/conformance/cases/kitchen_sink_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/maps_pb2.py b/gen/buf/validate/conformance/cases/maps_pb2.py index c7dcb0ec..6b0c76e0 100644 --- a/gen/buf/validate/conformance/cases/maps_pb2.py +++ b/gen/buf/validate/conformance/cases/maps_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/maps_pb2.pyi b/gen/buf/validate/conformance/cases/maps_pb2.pyi index a3435f72..57fe562d 100644 --- a/gen/buf/validate/conformance/cases/maps_pb2.pyi +++ b/gen/buf/validate/conformance/cases/maps_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/messages_pb2.py b/gen/buf/validate/conformance/cases/messages_pb2.py index 02a92a44..b16b68a8 100644 --- a/gen/buf/validate/conformance/cases/messages_pb2.py +++ b/gen/buf/validate/conformance/cases/messages_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/messages_pb2.pyi b/gen/buf/validate/conformance/cases/messages_pb2.pyi index 01ec660f..27b7d8fc 100644 --- a/gen/buf/validate/conformance/cases/messages_pb2.pyi +++ b/gen/buf/validate/conformance/cases/messages_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/numbers_pb2.py b/gen/buf/validate/conformance/cases/numbers_pb2.py index fd749396..8afaea86 100644 --- a/gen/buf/validate/conformance/cases/numbers_pb2.py +++ b/gen/buf/validate/conformance/cases/numbers_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/numbers_pb2.pyi b/gen/buf/validate/conformance/cases/numbers_pb2.pyi index 80dd05cd..e2a2cfa1 100644 --- a/gen/buf/validate/conformance/cases/numbers_pb2.pyi +++ b/gen/buf/validate/conformance/cases/numbers_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/oneofs_pb2.py b/gen/buf/validate/conformance/cases/oneofs_pb2.py index c62ac3a0..1c9e08a7 100644 --- a/gen/buf/validate/conformance/cases/oneofs_pb2.py +++ b/gen/buf/validate/conformance/cases/oneofs_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/oneofs_pb2.pyi b/gen/buf/validate/conformance/cases/oneofs_pb2.pyi index 0ffd633c..cde307b7 100644 --- a/gen/buf/validate/conformance/cases/oneofs_pb2.pyi +++ b/gen/buf/validate/conformance/cases/oneofs_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/other_package/embed_pb2.py b/gen/buf/validate/conformance/cases/other_package/embed_pb2.py index beab6450..80a6c843 100644 --- a/gen/buf/validate/conformance/cases/other_package/embed_pb2.py +++ b/gen/buf/validate/conformance/cases/other_package/embed_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/other_package/embed_pb2.pyi b/gen/buf/validate/conformance/cases/other_package/embed_pb2.pyi index 93c23150..cc11e532 100644 --- a/gen/buf/validate/conformance/cases/other_package/embed_pb2.pyi +++ b/gen/buf/validate/conformance/cases/other_package/embed_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/predefined_rules_proto2_pb2.py b/gen/buf/validate/conformance/cases/predefined_rules_proto2_pb2.py index 903f224d..4b7c400f 100644 --- a/gen/buf/validate/conformance/cases/predefined_rules_proto2_pb2.py +++ b/gen/buf/validate/conformance/cases/predefined_rules_proto2_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/predefined_rules_proto2_pb2.pyi b/gen/buf/validate/conformance/cases/predefined_rules_proto2_pb2.pyi index 98d19d01..b1ca825f 100644 --- a/gen/buf/validate/conformance/cases/predefined_rules_proto2_pb2.pyi +++ b/gen/buf/validate/conformance/cases/predefined_rules_proto2_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/predefined_rules_proto3_pb2.py b/gen/buf/validate/conformance/cases/predefined_rules_proto3_pb2.py index fa284ef6..f863779d 100644 --- a/gen/buf/validate/conformance/cases/predefined_rules_proto3_pb2.py +++ b/gen/buf/validate/conformance/cases/predefined_rules_proto3_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/predefined_rules_proto3_pb2.pyi b/gen/buf/validate/conformance/cases/predefined_rules_proto3_pb2.pyi index 38885f4c..aaef8e0d 100644 --- a/gen/buf/validate/conformance/cases/predefined_rules_proto3_pb2.pyi +++ b/gen/buf/validate/conformance/cases/predefined_rules_proto3_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/predefined_rules_proto_editions_pb2.py b/gen/buf/validate/conformance/cases/predefined_rules_proto_editions_pb2.py index 5977e01e..fab2ae91 100644 --- a/gen/buf/validate/conformance/cases/predefined_rules_proto_editions_pb2.py +++ b/gen/buf/validate/conformance/cases/predefined_rules_proto_editions_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/predefined_rules_proto_editions_pb2.pyi b/gen/buf/validate/conformance/cases/predefined_rules_proto_editions_pb2.pyi index 71d8a555..a84ee9c5 100644 --- a/gen/buf/validate/conformance/cases/predefined_rules_proto_editions_pb2.pyi +++ b/gen/buf/validate/conformance/cases/predefined_rules_proto_editions_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/repeated_pb2.py b/gen/buf/validate/conformance/cases/repeated_pb2.py index 5f01f120..e69162c9 100644 --- a/gen/buf/validate/conformance/cases/repeated_pb2.py +++ b/gen/buf/validate/conformance/cases/repeated_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/repeated_pb2.pyi b/gen/buf/validate/conformance/cases/repeated_pb2.pyi index 5365df57..349ee93b 100644 --- a/gen/buf/validate/conformance/cases/repeated_pb2.pyi +++ b/gen/buf/validate/conformance/cases/repeated_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/required_field_proto2_pb2.py b/gen/buf/validate/conformance/cases/required_field_proto2_pb2.py index 01d57973..608a4007 100644 --- a/gen/buf/validate/conformance/cases/required_field_proto2_pb2.py +++ b/gen/buf/validate/conformance/cases/required_field_proto2_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/required_field_proto2_pb2.pyi b/gen/buf/validate/conformance/cases/required_field_proto2_pb2.pyi index 19e3f169..baab1e25 100644 --- a/gen/buf/validate/conformance/cases/required_field_proto2_pb2.pyi +++ b/gen/buf/validate/conformance/cases/required_field_proto2_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/required_field_proto3_pb2.py b/gen/buf/validate/conformance/cases/required_field_proto3_pb2.py index 9e3fdac8..105042fc 100644 --- a/gen/buf/validate/conformance/cases/required_field_proto3_pb2.py +++ b/gen/buf/validate/conformance/cases/required_field_proto3_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/required_field_proto3_pb2.pyi b/gen/buf/validate/conformance/cases/required_field_proto3_pb2.pyi index 81dc7c66..639e8191 100644 --- a/gen/buf/validate/conformance/cases/required_field_proto3_pb2.pyi +++ b/gen/buf/validate/conformance/cases/required_field_proto3_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/required_field_proto_editions_pb2.py b/gen/buf/validate/conformance/cases/required_field_proto_editions_pb2.py index ef9ff24a..838b6374 100644 --- a/gen/buf/validate/conformance/cases/required_field_proto_editions_pb2.py +++ b/gen/buf/validate/conformance/cases/required_field_proto_editions_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/required_field_proto_editions_pb2.pyi b/gen/buf/validate/conformance/cases/required_field_proto_editions_pb2.pyi index 03997a9a..43868d07 100644 --- a/gen/buf/validate/conformance/cases/required_field_proto_editions_pb2.pyi +++ b/gen/buf/validate/conformance/cases/required_field_proto_editions_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/strings_pb2.py b/gen/buf/validate/conformance/cases/strings_pb2.py index 37da9cfe..4b871dff 100644 --- a/gen/buf/validate/conformance/cases/strings_pb2.py +++ b/gen/buf/validate/conformance/cases/strings_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/strings_pb2.pyi b/gen/buf/validate/conformance/cases/strings_pb2.pyi index 373efcc8..d4b37a5d 100644 --- a/gen/buf/validate/conformance/cases/strings_pb2.pyi +++ b/gen/buf/validate/conformance/cases/strings_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/subdirectory/in_subdirectory_pb2.py b/gen/buf/validate/conformance/cases/subdirectory/in_subdirectory_pb2.py index d93f7fec..b1865305 100644 --- a/gen/buf/validate/conformance/cases/subdirectory/in_subdirectory_pb2.py +++ b/gen/buf/validate/conformance/cases/subdirectory/in_subdirectory_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/subdirectory/in_subdirectory_pb2.pyi b/gen/buf/validate/conformance/cases/subdirectory/in_subdirectory_pb2.pyi index b92f01b1..82af1abf 100644 --- a/gen/buf/validate/conformance/cases/subdirectory/in_subdirectory_pb2.pyi +++ b/gen/buf/validate/conformance/cases/subdirectory/in_subdirectory_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/wkt_any_pb2.py b/gen/buf/validate/conformance/cases/wkt_any_pb2.py index ac671e1b..424cbe6f 100644 --- a/gen/buf/validate/conformance/cases/wkt_any_pb2.py +++ b/gen/buf/validate/conformance/cases/wkt_any_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/wkt_any_pb2.pyi b/gen/buf/validate/conformance/cases/wkt_any_pb2.pyi index 60ff04fc..4b5ffe5f 100644 --- a/gen/buf/validate/conformance/cases/wkt_any_pb2.pyi +++ b/gen/buf/validate/conformance/cases/wkt_any_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/wkt_duration_pb2.py b/gen/buf/validate/conformance/cases/wkt_duration_pb2.py index f9041e3e..9cda2b72 100644 --- a/gen/buf/validate/conformance/cases/wkt_duration_pb2.py +++ b/gen/buf/validate/conformance/cases/wkt_duration_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/wkt_duration_pb2.pyi b/gen/buf/validate/conformance/cases/wkt_duration_pb2.pyi index 69e7ed62..b957c78f 100644 --- a/gen/buf/validate/conformance/cases/wkt_duration_pb2.pyi +++ b/gen/buf/validate/conformance/cases/wkt_duration_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/wkt_nested_pb2.py b/gen/buf/validate/conformance/cases/wkt_nested_pb2.py index fa5f525d..268730fe 100644 --- a/gen/buf/validate/conformance/cases/wkt_nested_pb2.py +++ b/gen/buf/validate/conformance/cases/wkt_nested_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/wkt_nested_pb2.pyi b/gen/buf/validate/conformance/cases/wkt_nested_pb2.pyi index 6ef4cbfa..96d894d9 100644 --- a/gen/buf/validate/conformance/cases/wkt_nested_pb2.pyi +++ b/gen/buf/validate/conformance/cases/wkt_nested_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/wkt_timestamp_pb2.py b/gen/buf/validate/conformance/cases/wkt_timestamp_pb2.py index 55719573..2790fb07 100644 --- a/gen/buf/validate/conformance/cases/wkt_timestamp_pb2.py +++ b/gen/buf/validate/conformance/cases/wkt_timestamp_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/wkt_timestamp_pb2.pyi b/gen/buf/validate/conformance/cases/wkt_timestamp_pb2.pyi index fa20968c..f7db1f81 100644 --- a/gen/buf/validate/conformance/cases/wkt_timestamp_pb2.pyi +++ b/gen/buf/validate/conformance/cases/wkt_timestamp_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/wkt_wrappers_pb2.py b/gen/buf/validate/conformance/cases/wkt_wrappers_pb2.py index da1ca22e..3e2e7ca8 100644 --- a/gen/buf/validate/conformance/cases/wkt_wrappers_pb2.py +++ b/gen/buf/validate/conformance/cases/wkt_wrappers_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/wkt_wrappers_pb2.pyi b/gen/buf/validate/conformance/cases/wkt_wrappers_pb2.pyi index e90bb713..885ed053 100644 --- a/gen/buf/validate/conformance/cases/wkt_wrappers_pb2.pyi +++ b/gen/buf/validate/conformance/cases/wkt_wrappers_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/yet_another_package/embed2_pb2.py b/gen/buf/validate/conformance/cases/yet_another_package/embed2_pb2.py index 81a4dfdf..796712c9 100644 --- a/gen/buf/validate/conformance/cases/yet_another_package/embed2_pb2.py +++ b/gen/buf/validate/conformance/cases/yet_another_package/embed2_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/cases/yet_another_package/embed2_pb2.pyi b/gen/buf/validate/conformance/cases/yet_another_package/embed2_pb2.pyi index 557ca06f..712fac84 100644 --- a/gen/buf/validate/conformance/cases/yet_another_package/embed2_pb2.pyi +++ b/gen/buf/validate/conformance/cases/yet_another_package/embed2_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/harness/harness_pb2.py b/gen/buf/validate/conformance/harness/harness_pb2.py index 64eb02f4..6d2791f5 100644 --- a/gen/buf/validate/conformance/harness/harness_pb2.py +++ b/gen/buf/validate/conformance/harness/harness_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/harness/harness_pb2.pyi b/gen/buf/validate/conformance/harness/harness_pb2.pyi index 39b88d0b..751b7a37 100644 --- a/gen/buf/validate/conformance/harness/harness_pb2.pyi +++ b/gen/buf/validate/conformance/harness/harness_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/harness/results_pb2.py b/gen/buf/validate/conformance/harness/results_pb2.py index 4b01c058..c5f2e9fc 100644 --- a/gen/buf/validate/conformance/harness/results_pb2.py +++ b/gen/buf/validate/conformance/harness/results_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/conformance/harness/results_pb2.pyi b/gen/buf/validate/conformance/harness/results_pb2.pyi index 1816b5ec..b8ec7ddf 100644 --- a/gen/buf/validate/conformance/harness/results_pb2.pyi +++ b/gen/buf/validate/conformance/harness/results_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/validate_pb2.py b/gen/buf/validate/validate_pb2.py index e797c608..7a2d9957 100644 --- a/gen/buf/validate/validate_pb2.py +++ b/gen/buf/validate/validate_pb2.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/gen/buf/validate/validate_pb2.pyi b/gen/buf/validate/validate_pb2.pyi index 7e855bbd..b1b17c18 100644 --- a/gen/buf/validate/validate_pb2.pyi +++ b/gen/buf/validate/validate_pb2.pyi @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/protovalidate/__init__.py b/protovalidate/__init__.py index 0c59896f..0f82fccb 100644 --- a/protovalidate/__init__.py +++ b/protovalidate/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/protovalidate/internal/__init__.py b/protovalidate/internal/__init__.py index 29a76bbb..1c23345b 100644 --- a/protovalidate/internal/__init__.py +++ b/protovalidate/internal/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/protovalidate/internal/cel_field_presence.py b/protovalidate/internal/cel_field_presence.py index a6bf4872..beffdbe8 100644 --- a/protovalidate/internal/cel_field_presence.py +++ b/protovalidate/internal/cel_field_presence.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ import threading -import celpy # type: ignore +import celpy _has_state = threading.local() diff --git a/protovalidate/internal/constraints.py b/protovalidate/internal/constraints.py index 3442297a..2519108d 100644 --- a/protovalidate/internal/constraints.py +++ b/protovalidate/internal/constraints.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,8 +16,8 @@ import datetime import typing -import celpy # type: ignore -from celpy import celtypes # type: ignore +import celpy +from celpy import celtypes from google.protobuf import any_pb2, descriptor, message, message_factory from buf.validate import validate_pb2 # type: ignore @@ -247,7 +247,7 @@ def __init__(self, *, field_value: typing.Any = None, rule_value: typing.Any = N class ConstraintContext: """The state associated with a single constraint evaluation.""" - def __init__(self, fail_fast: bool = False, violations: typing.Optional[list[Violation]] = None): # noqa: FBT001, FBT002 + def __init__(self, *, fail_fast: bool = False, violations: typing.Optional[list[Violation]] = None): self._fail_fast = fail_fast if violations is None: violations = [] @@ -283,13 +283,13 @@ def has_errors(self) -> bool: return len(self._violations) > 0 def sub_context(self): - return ConstraintContext(self._fail_fast) + return ConstraintContext(fail_fast=self._fail_fast) class ConstraintRules: """The constraints associated with a single 'rules' message.""" - def validate(self, ctx: ConstraintContext, message: message.Message): # noqa: ARG002 + def validate(self, ctx: ConstraintContext, _: message.Message): """Validate the message against the rules in this constraint.""" ctx.add(Violation(constraint_id="unimplemented", message="Unimplemented")) @@ -541,9 +541,6 @@ def _validate_value(self, ctx: ConstraintContext, val: typing.Any, *, for_key: b class AnyConstraintRules(FieldConstraintRules): """Rules for an Any field.""" - _in: list[str] = [] # noqa: RUF012 - _not_in: list[str] = [] # noqa: RUF012 - _in_rule_path: typing.ClassVar[validate_pb2.FieldPath] = validate_pb2.FieldPath( elements=[ _field_to_element(validate_pb2.AnyRules.DESCRIPTOR.fields_by_number[validate_pb2.AnyRules.IN_FIELD_NUMBER]), @@ -576,8 +573,10 @@ def __init__( field_level: validate_pb2.FieldConstraints, ): super().__init__(env, funcs, field, field_level) + self._in = [] if getattr(field_level.any, "in"): self._in = getattr(field_level.any, "in") + self._not_in = [] if field_level.any.not_in: self._not_in = field_level.any.not_in diff --git a/protovalidate/internal/extra_func.py b/protovalidate/internal/extra_func.py index 957663b5..cf211c75 100644 --- a/protovalidate/internal/extra_func.py +++ b/protovalidate/internal/extra_func.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ from ipaddress import IPv4Address, IPv4Network, IPv6Address, IPv6Network, ip_address, ip_network from urllib import parse as urlparse -import celpy # type: ignore -from celpy import celtypes # type: ignore +import celpy +from celpy import celtypes from protovalidate.internal import string_format diff --git a/protovalidate/internal/string_format.py b/protovalidate/internal/string_format.py index 0099f13a..b6b1338d 100644 --- a/protovalidate/internal/string_format.py +++ b/protovalidate/internal/string_format.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ from decimal import Decimal -import celpy # type: ignore -from celpy import celtypes # type: ignore +import celpy +from celpy import celtypes QUOTE_TRANS = str.maketrans( { @@ -190,8 +190,3 @@ def format_list(self, arg: celtypes.ListType) -> celpy.Result: def _format_duration(self, arg: celtypes.DurationType) -> celpy.Result: return f"{arg.seconds + Decimal(arg.microseconds) / Decimal(1_000_000):f}s" - - -_default_format = StringFormat("en_US") -format = _default_format.format # noqa: A001 -format_value = _default_format.format_value diff --git a/protovalidate/validator.py b/protovalidate/validator.py index 08293435..45fffa01 100644 --- a/protovalidate/validator.py +++ b/protovalidate/validator.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/__init__.py b/tests/__init__.py index 29a76bbb..1c23345b 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/conformance/__init__.py b/tests/conformance/__init__.py index 29a76bbb..1c23345b 100644 --- a/tests/conformance/__init__.py +++ b/tests/conformance/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/conformance/runner.py b/tests/conformance/runner.py index d15a7a94..7e56acbf 100644 --- a/tests/conformance/runner.py +++ b/tests/conformance/runner.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ import sys import typing -import celpy # type: ignore +import celpy from google.protobuf import any_pb2, descriptor, descriptor_pool, message_factory import protovalidate diff --git a/tests/validate_test.py b/tests/validate_test.py index 09f529ad..e95aa9e8 100644 --- a/tests/validate_test.py +++ b/tests/validate_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 Buf Technologies, Inc. +# Copyright 2023-2025 Buf Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.