mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Replace pkg_resources.get_distribution with importlib-metadata
This commit is contained in:
parent
9c37473256
commit
ebe5132576
5 changed files with 20 additions and 7 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import pkg_resources
|
||||
import importlib_metadata # TODO: importlib.metadata py38?
|
||||
|
||||
CONFIG_FILE = '.pre-commit-config.yaml'
|
||||
MANIFEST_FILE = '.pre-commit-hooks.yaml'
|
||||
|
|
@ -18,8 +18,7 @@ INSTALLED_STATE_VERSION = '1'
|
|||
# Bump when modifying `empty_template`
|
||||
LOCAL_REPO_VERSION = '1'
|
||||
|
||||
VERSION = pkg_resources.get_distribution('pre-commit').version
|
||||
VERSION_PARSED = pkg_resources.parse_version(VERSION)
|
||||
VERSION = importlib_metadata.version('pre_commit')
|
||||
|
||||
# `manual` is not invoked by any installed git hook. See #719
|
||||
STAGES = ('commit', 'commit-msg', 'manual', 'push')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue