Skip to content

Commit

Permalink
Update .pre-commit-config.yaml (#435)
Browse files Browse the repository at this point in the history
* Update .pre-commit-config.yaml

updated pyupgrade argument

* Update types.py

apply result of run pyupgrade --py38-plus

* deleted extra import in types.py

deleted extra import
  • Loading branch information
alexted authored Jan 19, 2024
1 parent 4abceb1 commit 401f59c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
rev: v3.15.0
hooks:
- id: pyupgrade
args: ['--py37-plus']
args: ['--py38-plus']
- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
Expand Down
8 changes: 1 addition & 7 deletions src/flask_jsonrpc/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@
except ImportError: # pragma: no cover
from typing import Literal # type: ignore # pylint: disable=C0412

# Python 3.8+
try:
from typing_extensions import Final
except ImportError: # pragma: no cover
from typing import Final # type: ignore # pylint: disable=C0412

# Python 3.7+
try:
from typing import get_args # pylint: disable=C0412
Expand Down Expand Up @@ -120,7 +114,7 @@ def check_type(self, o: t.Any) -> bool: # pylint: disable=R0911
if origin_type is Literal:
return self.check_args_type(expected_type)

if origin_type is Final:
if origin_type is t.Final:
return self.check_args_type(expected_type)

expected_type = origin_type
Expand Down

0 comments on commit 401f59c

Please sign in to comment.