diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 69ef8095..5e20e696 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install ruff black + pip install ruff - name: Run lint script run: bash scripts/lint.sh diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 95a94acd..4a2bf677 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,8 +12,3 @@ repos: hooks: - id: ruff args: [ --fix, --exit-non-zero-on-fix ] - -- repo: https://github.com/psf/black - rev: 23.7.0 - hooks: - - id: black diff --git a/CHANGELOG b/CHANGELOG index 7f8866b6..0c3f8005 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -256,3 +256,7 @@ 1.0.8 31/03/2024 * Fix parsing replications events (#614) + +1.0.9 11/08/2024 +* Fix typo in ident variable name (#619) +* Remove black and use only ruff as linter \ No newline at end of file diff --git a/pymysqlreplication/binlogstream.py b/pymysqlreplication/binlogstream.py index 9e7befbc..0ba4ca5c 100644 --- a/pymysqlreplication/binlogstream.py +++ b/pymysqlreplication/binlogstream.py @@ -767,7 +767,7 @@ def __log_valid_parameters(self): parameter = parameter.replace("_BinLogStreamReader__", "") if parameter in ignored or not value: continue - if type(value) == frozenset: + if value is frozenset: string_list = [ str(item).split()[-1][:-2].split(".")[2] for item in value ] diff --git a/pyproject.toml b/pyproject.toml index 033760f5..638c65c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,8 @@ [tool.ruff] -ignore = [ - "E501", # Line too long, handled by black +lint.ignore = [ "F403", # from module import *' used, It should be removed afterwad "F405", # same to F403 ] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "__init__.py" = ["F401"] diff --git a/scripts/lint.sh b/scripts/lint.sh index eee4960c..a1ce6aff 100644 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -3,5 +3,4 @@ set -e set -x -ruff pymysqlreplication -black pymysqlreplication --check +ruff check pymysqlreplication