Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#516)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/asottile/pyupgrade: v3.16.0 → v3.17.0](asottile/pyupgrade@v3.16.0...v3.17.0)
- [github.com/astral-sh/ruff-pre-commit: v0.4.10 → v0.6.1](astral-sh/ruff-pre-commit@v0.4.10...v0.6.1)
- [github.com/pre-commit/mirrors-mypy: v1.10.0 → v1.11.1](pre-commit/mirrors-mypy@v1.10.0...v1.11.1)
- [github.com/PyCQA/pylint: v3.2.3 → v3.2.6](pylint-dev/pylint@v3.2.3...v3.2.6)
- [github.com/pycontribs/mirrors-prettier: v3.3.1 → v3.3.3](pycontribs/mirrors-prettier@v3.3.1...v3.3.3)

* Linter fix

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kiran Jonnalagadda <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and jace authored Aug 20, 2024
1 parent d00ec6a commit d40dee9
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 44 deletions.
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

0 comments on commit d40dee9

Please sign in to comment.