Skip to content

Commit

Permalink
Merge pull request #120 from jazzband/modanize-formatter
Browse files Browse the repository at this point in the history
Modernize formatter: use ruff instead of flake8
  • Loading branch information
shimizukawa authored Jun 1, 2024
2 parents 58c508d + 69d7caf commit f2ebb67
Show file tree
Hide file tree
Showing 5 changed files with 393 additions and 203 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fail-fast: false
matrix:
linter:
- flake8
- lint
- check

steps:
Expand Down
2 changes: 2 additions & 0 deletions django_redshift_backend/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
try: # py38 or later
from importlib.metadata import version, PackageNotFoundError

try:
__version__ = version("package-name")
except PackageNotFoundError:
# package is not installed
pass
except ImportError: # py37
from pkg_resources import get_distribution, DistributionNotFound

try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
Expand Down
Loading

0 comments on commit f2ebb67

Please sign in to comment.