Skip to content

Commit

Permalink
pre-commit upgrade, switch to isort
Browse files Browse the repository at this point in the history
  • Loading branch information
tdegeus committed Feb 9, 2024
1 parent 5f0a95e commit 86baf98
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 7 deletions.
14 changes: 8 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
- id: check-toml
- id: debug-statements
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.11.0
rev: v2.12.0
hooks:
- id: pretty-format-yaml
args: [--preserve-quotes, --autofix, --indent, '2']
Expand All @@ -25,7 +25,7 @@ repos:
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/psf/black
rev: 23.10.0
rev: 24.1.1
hooks:
- id: black
args: [--safe, --quiet, --line-length=100]
Expand All @@ -34,17 +34,19 @@ repos:
hooks:
- id: autoflake
args: [--in-place, --remove-unused-variable]
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.12.0
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: reorder-python-imports
- id: isort
name: isort
args: ["--force-single-line", "--line-length=100", "--profile=black"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py36-plus]
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
args: ['--ignore=E722,W503', --max-line-length=100, '--per-file-ignores=*/__init__.py:F401']
Expand Down
3 changes: 2 additions & 1 deletion GooseBib/bibtex.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Check if up-to-date.
* Compare.
"""

import argparse
import difflib
import inspect
Expand All @@ -14,8 +15,8 @@
import sys
import textwrap
import warnings
from collections import defaultdict
from collections import OrderedDict
from collections import defaultdict
from functools import singledispatch
from typing import Tuple
from typing import Union
Expand Down
1 change: 1 addition & 0 deletions GooseBib/cli/GbibCheckAuthors.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
(c - MIT) T.W.J. de Geus | [email protected] | www.geus.me | github.com/tdegeus/GooseBib
"""

# ==================================================================================================
import os
import re
Expand Down
1 change: 1 addition & 0 deletions GooseBib/cli/GbibCheckKeys.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
(c - MIT) T.W.J. de Geus | [email protected] | www.geus.me | github.com/tdegeus/GooseBib
"""

# ==================================================================================================
import os
import re
Expand Down
1 change: 1 addition & 0 deletions GooseBib/cli/GbibCheckLink.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
(c - MIT) T.W.J. de Geus | [email protected] | www.geus.me | github.com/tdegeus/GooseBib
"""

# ==================================================================================================
import os
import re
Expand Down
1 change: 1 addition & 0 deletions GooseBib/cli/GbibList.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
(c - MIT) T.W.J. de Geus | [email protected] | www.geus.me | github.com/tdegeus/GooseBib
"""

# ==================================================================================================
import os
import re
Expand Down
1 change: 1 addition & 0 deletions GooseBib/cli/GbibParse.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
(c - MIT) T.W.J. de Geus | [email protected] | www.geus.me | github.com/tdegeus/GooseBib
"""

# ==================================================================================================
import os
import re
Expand Down
1 change: 1 addition & 0 deletions GooseBib/cli/GbibSelect.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
(c - MIT) T.W.J. de Geus | [email protected] | www.geus.me | github.com/tdegeus/GooseBib
"""

# ==================================================================================================
import os
import re
Expand Down
1 change: 1 addition & 0 deletions GooseBib/cli/GbibSelectAlias.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
(c - MIT) T.W.J. de Geus | [email protected] | www.geus.me | github.com/tdegeus/GooseBib
"""

# ==================================================================================================
import json
import os
Expand Down
1 change: 1 addition & 0 deletions GooseBib/journals.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
Note that the minimal requirement is to store the ``name``, the ``abbreviation``, ``acronym``,
and ``variations`` are optional.
"""

from __future__ import annotations

import csv
Expand Down
1 change: 1 addition & 0 deletions GooseBib/reformat.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Automatic formatting.
"""

import re

import bibtexparser
Expand Down

0 comments on commit 86baf98

Please sign in to comment.