Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump ruff from 0.4.9 to 0.5.0 #168

Merged
merged 4 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ generate: $(BIN)/buf $(BIN)/license-header ## Regenerate code and license header
format: install $(BIN)/license-header ## Format code
$(ADD_LICENSE_HEADER)
pipenv run ruff format protovalidate tests
pipenv run ruff --fix protovalidate tests
pipenv run ruff check --fix protovalidate tests

.PHONY: test
test: $(BIN)/protovalidate-conformance generate install ## Run unit tests
Expand All @@ -55,13 +55,13 @@ conformance: $(BIN)/protovalidate-conformance generate install ## Run conformanc
lint: install ## Lint code
pipenv run ruff format --check --diff protovalidate tests
pipenv run mypy protovalidate
pipenv run ruff protovalidate tests
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 --fix protovalidate tests
pipenv run ruff check --fix protovalidate tests

.PHONY: install
install: ## Install dependencies
Expand Down
37 changes: 19 additions & 18 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions protovalidate/internal/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ def __init__(
rules = getattr(field_level, type_case)
# For each set field in the message, look for the private constraint
# extension.
for field, _ in rules.ListFields():
if private_pb2.field in field.GetOptions().Extensions:
for cel in field.GetOptions().Extensions[private_pb2.field].cel:
for list_field, _ in rules.ListFields():
if private_pb2.field in list_field.GetOptions().Extensions:
for cel in list_field.GetOptions().Extensions[private_pb2.field].cel:
self.add_rule(env, funcs, cel)
for cel in field_level.cel:
self.add_rule(env, funcs, cel)
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ lint.select = [
"FBT",
"I",
"ICN",
"ISC",
"N",
"PLC",
"PLE",
Expand Down
Loading