Skip to content

Commit

Permalink
chore: update dev dependencies (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCrab13 authored Mar 24, 2024
1 parent 25c6036 commit 1278ae9
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 14 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Lint

# If a pull-request is pushed then cancel all previously running jobs related
# to that pull-request
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

on:
push:
branches:
- main
pull_request:
branches:
- main

env:
PY_COLORS: 1

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.0
with:
fetch-depth: 0
- uses: actions/setup-python@v4.7.0
with:
python-version: "3.11"
- run: pip install --upgrade tox
- name: Run commitizen (https://commitizen-tools.github.io/commitizen/)
run: tox -e cz
- name: Run black code formatter (https://black.readthedocs.io/en/stable/)
run: tox -e black -- --check
- name: Run flake8 (https://flake8.pycqa.org/en/latest/)
run: tox -e flake8
- name: Run mypy static typing checker (http://mypy-lang.org/)
run: tox -e mypy
- name: Run isort import order checker (https://pycqa.github.io/isort/)
run: tox -e isort -- --check
- name: Run pylint Python code static checker (/~https://github.com/PyCQA/pylint)
run: tox -e pylint
4 changes: 2 additions & 2 deletions .github/workflows/pre_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
branches:
- main
paths:
.github/workflows/pre_commit.yml
.pre-commit-config.yaml
- .github/workflows/pre_commit.yml
- .pre-commit-config.yaml
pull_request:
branches:
- main
Expand Down
3 changes: 1 addition & 2 deletions pdbstore/cli/commands/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ def fetch_text_formatter(summary: Summary) -> None:
file_path = symbol_path
symbol_path = None
file_len = len(symbol_path or file_path)
if (file_len + 2) > input_len:
input_len = file_len + 2
input_len = max(input_len, file_len + 2)

cli_out_write(f"{'Input File':<{input_len}s}{'Compressed':^10s} Symbol File")
for cur in summary.iterator():
Expand Down
3 changes: 1 addition & 2 deletions pdbstore/cli/commands/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ def query_text_formatter(summary: Summary) -> None:
file_len = len(input_path)
else:
file_len = len(file_path)
if (file_len + 2) > input_len:
input_len = file_len + 2
input_len = max(input_len, file_len + 2)

cli_out_write(f"{'Input File':<{input_len}s}{'Compressed':^10s} Symbol File")
for cur in summary.iterator():
Expand Down
1 change: 1 addition & 0 deletions pdbstore/store/transaction.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
""" Manage a single transaction.
"""

import concurrent.futures as cf
import os
import re
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ disable = [
"missing-module-docstring",
"too-many-branches",
"too-many-statements",
"duplicate-code",
]
max-args=15 # Maximum number of arguments for function / method.
max-attributes=20 # Maximum number of attributes for a class (see R0902).
Expand Down
14 changes: 7 additions & 7 deletions requirements-lint.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
-r requirements.txt
build==1.0.3
black==23.1.0
commitizen==2.42.1
flake8==6.0.0
isort==5.12.0
mypy==1.1.1
pylint==2.17.1
pytest==7.2.2
black==24.3.0
commitizen==3.20.0
flake8==7.0.0
isort==5.13.2
mypy==1.9.0
pylint==3.1.0
pytest==8.1.1
types-setuptools==65.7.0.4
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ basepython = python3
envdir={toxworkdir}/cz
deps = -r{toxinidir}/requirements-lint.txt
commands =
cz check --rev-range f3cb6c0..HEAD
cz check --rev-range b508ef5..HEAD

[testenv:twine-check]
basepython = python3
Expand Down

0 comments on commit 1278ae9

Please sign in to comment.