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

[pre-commit.ci] pre-commit autoupdate #516

Merged
merged 2 commits into from
Aug 20, 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
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
rev: v3.17.0
hooks:
- id: pyupgrade
args: ['--keep-runtime-typing', '--py311-plus']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.10
rev: v0.6.1
hooks:
- id: ruff
args: ['--fix', '--exit-non-zero-on-fix']
Expand Down Expand Up @@ -40,7 +40,7 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
rev: v1.11.1
hooks:
- id: mypy
# warn-unused-ignores is unsafe with pre-commit, see
Expand All @@ -57,7 +57,7 @@ repos:
- types-setuptools
- typing-extensions
- repo: https://github.com/PyCQA/pylint
rev: v3.2.3
rev: v3.2.6
hooks:
- id: pylint
args: [
Expand All @@ -77,6 +77,6 @@ repos:
additional_dependencies:
- 'bandit[toml]'
- repo: https://github.com/pycontribs/mirrors-prettier
rev: v3.3.1
rev: v3.3.3
hooks:
- id: prettier
4 changes: 1 addition & 3 deletions boxoffice/models/discount_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,7 @@ def is_signed_code_usable(cls, policy: DiscountPolicy, code: str) -> bool:
cls.code == code,
cls.used_count == cls.usage_limit,
).one_or_none()
if obj:
return False
return True
return not obj

def update_used_count(self) -> None:
self.used_count = (
Expand Down
72 changes: 36 additions & 36 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -208,40 +208,40 @@ quote-style = "preserve"
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

select = [
"A", # flake8-builtins
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C", # pylint convention
"D", # pydocstyle
"C4", # flake8-comprehensions
"C90", # mccabe
"E", # Error
"EM", # flake8-errmsg
"EXE", # flake8-executable
"F", # pyflakes
"FA", # flake8-future-annotations
"G", # flake8-logging-format
"I", # isort
"INP", # flake8-no-pep420
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"PYI", # flake8-pyi
"RET", # flake8-return
"RUF", # Ruff
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"T20", # flake8-print
"TRIO", # flake8-trio
"UP", # pyupgrade
"W", # Warnings
"YTT", # flake8-2020
"A", # flake8-builtins
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"ASYNC1", # flake8-trio
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C", # pylint convention
"D", # pydocstyle
"C4", # flake8-comprehensions
"C90", # mccabe
"E", # Error
"EM", # flake8-errmsg
"EXE", # flake8-executable
"F", # pyflakes
"FA", # flake8-future-annotations
"G", # flake8-logging-format
"I", # isort
"INP", # flake8-no-pep420
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"PYI", # flake8-pyi
"RET", # flake8-return
"RUF", # Ruff
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"T20", # flake8-print
"UP", # pyupgrade
"W", # Warnings
"YTT", # flake8-2020
]
ignore = [
"ANN002",
Expand All @@ -261,8 +261,8 @@ ignore = [
"D212",
"E402",
"E501",
"EM101", # Allow Exception("string")
"EM102", # Allow Exception(f"string")
"EM101", # Allow Exception("string")
"EM102", # Allow Exception(f"string")
"ISC001",
]

Expand Down
Loading