Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/conda_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ on:
push:
branches: ["master"]

permissions:
contents: read

jobs:
tests:
name: "Conda"
permissions:
contents: read
runs-on: ubuntu-22.04
defaults:
run:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/docs_test_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ on:
- 'imgbot'
pull_request:

permissions:
contents: read

jobs:
docs:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout πŸ›ŽοΈ
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ on:
- 'imgbot'
pull_request:

permissions:
contents: read

jobs:
Run:
name: "Flake8"
permissions:
contents: read
runs-on: "ubuntu-22.04"

steps:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ on:
- 'imgbot'
pull_request:

permissions:
contents: read

jobs:
Run:
permissions:
contents: read
name: "mypy / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/octocheese.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ on:
schedule:
- cron: 0 12 * * *

permissions:
contents: write

jobs:
Run:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: domdfcoding/octocheese@master
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/python_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ on:

pull_request:

permissions:
actions: write
issues: write
contents: read

jobs:
tests:
permissions:
actions: write
contents: read
name: "windows-2022 / Python ${{ matrix.config.python-version }}"
runs-on: "windows-2022"
continue-on-error: ${{ matrix.config.experimental }}
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/python_ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ on:
- '*'
pull_request:

permissions:
actions: write
issues: write
contents: read

jobs:
tests:
permissions:
actions: write
contents: read
name: "ubuntu-22.04 / Python ${{ matrix.config.python-version }}"
runs-on: "ubuntu-22.04"
continue-on-error: ${{ matrix.config.experimental }}
Expand Down Expand Up @@ -85,6 +83,9 @@ jobs:

Coverage:
needs: tests
permissions:
actions: write
contents: read
runs-on: "ubuntu-22.04"
steps:
- name: Checkout πŸ›ŽοΈ
Expand Down Expand Up @@ -134,7 +135,10 @@ jobs:

Deploy:
needs: tests

permissions:
actions: write
issues: write
contents: read
runs-on: "ubuntu-22.04"
steps:
- name: Checkout πŸ›ŽοΈ
Expand Down Expand Up @@ -179,6 +183,8 @@ jobs:

Conda:
needs: deploy
permissions:
contents: read
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/') || (startsWith(github.event.head_commit.message, 'Bump version') != true)
steps:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/python_ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ on:

pull_request:

permissions:
actions: write
issues: write
contents: read

jobs:
tests:
permissions:
actions: write
contents: read
name: "macos-${{ matrix.config.os-ver }} / Python ${{ matrix.config.python-version }}"
runs-on: "macos-${{ matrix.config.os-ver }}"
continue-on-error: ${{ matrix.config.experimental }}
Expand Down
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ repos:
- id: check-added-large-files
- id: check-ast
- id: fix-byte-order-marker
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
Expand Down Expand Up @@ -85,9 +84,11 @@ repos:
hooks:
- id: formate
exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$
additional_dependencies:
- formate-trailing-commas>=0.1.0

- repo: https://github.com/python-coincidence/dep_checker
rev: v0.8.0
rev: v0.9.0
hooks:
- id: dep_checker
args:
Expand Down
2 changes: 1 addition & 1 deletion .style.yapf
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ split_before_dict_set_generator=True
#
# foo = ('This is a really long string: {}, {}, {}, {}'
# .format(a, b, c, d))
split_before_dot=False
split_before_dot=True

# Split after the opening paren which surrounds an expression if it doesn't
# fit on a single line.
Expand Down
30 changes: 6 additions & 24 deletions formate.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ priority = 30
[hooks.yapf.kwargs]
yapf_style = ".style.yapf"

[hooks.trailing_commas]
priority = 21

[hooks.trailing_commas.kwargs]
format_ImportFrom = false

[hooks.isort]
priority = 50

Expand All @@ -27,30 +33,6 @@ lines_between_types = 0
use_parentheses = true
remove_redundant_aliases = true
default_section = "THIRDPARTY"
known_third_party = [
"backports_entry_points_selectable",
"click",
"coincidence",
"colorama",
"coverage",
"coverage_pyver_pragma",
"deprecation_alias",
"domdf_python_tools",
"github",
"importlib_metadata",
"mistletoe",
"mypy",
"psutil",
"pytest",
"pytest_cov",
"pytest_mypy_plugins",
"pytest_mypy_plugins_shim",
"pytest_randomly",
"pytest_regressions",
"pytest_timeout",
"requests",
"typing_extensions",
]
known_first_party = [ "consolekit",]

[config]
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ deps =
flake8-strftime>=0.1.1
flake8-typing-imports>=1.10.0
flake8-params>=0.1.0
git+https://github.com/python-formate/flake8-commas.git@2.1.0-python-formate.0
git+https://github.com/python-formate/flake8-commas.git@4.0.0-python-formate.0
git+https://github.com/domdfcoding/restructuredtext-lint.git@fix-deprecations
git+https://github.com/domdfcoding/flake8-rst-docstrings-sphinx.git
git+https://github.com/domdfcoding/flake8-rst-docstrings.git
Expand Down
Loading