Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3006.x] Update formatters and code to avoid merge-forward conflicts #66147

Merged
merged 6 commits into from
Feb 29, 2024
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,6 @@ tests/integration/cloud/providers/pki/minions
# Ignore pyenv files
.python-version

# Kitchen tests files
.kitchen.local.yml
kitchen.local.yml
.kitchen/
.bundle/
Gemfile.lock
/artifacts/
requirements/static/*/py*/*.log

Expand All @@ -127,6 +121,7 @@ Session.vim

# Nox requirements archives
nox.*.tar.bzip2
nox.*.tar.gz
nox.*.tar.xz

# Debian packages
Expand Down
108 changes: 0 additions & 108 deletions .gitlab-ci.yml

This file was deleted.

31 changes: 15 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exclude: ^(doc/_static/.*|doc/_themes/.*)$
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: trailing-whitespace # Trims trailing whitespace.
Expand Down Expand Up @@ -1622,11 +1622,11 @@ repos:

# ----- Code Formatting ------------------------------------------------------------------------------------------->
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.2
rev: v3.15.1
hooks:
- id: pyupgrade
name: Drop six usage and Py2 support
args: [--py3-plus, --keep-mock]
name: Upgrade code to Py3.7+
args: [--py37-plus, --keep-mock]
exclude: >
(?x)^(
salt/client/ssh/ssh_py_shim.py
Expand All @@ -1643,7 +1643,7 @@ repos:

- repo: https://github.com/saltstack/salt-rewrite
# Automatically rewrite code with known rules
rev: 2.4.4
rev: 2.5.2
hooks:
- id: salt-rewrite
alias: rewrite-docstrings
Expand All @@ -1662,7 +1662,7 @@ repos:
args: [--silent, -E, fix_asserts, -E, fix_docstrings]

- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
additional_dependencies: ['toml']
Expand All @@ -1672,36 +1672,35 @@ repos:
(?x)^(
templates/.*|
salt/ext/.*|
tests/kitchen/.*
)$

- repo: https://github.com/psf/black
rev: 22.6.0
rev: 24.2.0
hooks:
- id: black
# This tells pre-commit not to pass files to black.
# This should be kept in sync with pyproject.toml
exclude: >
(?x)^(
salt/client/ssh/ssh_py_shim\.py|
templates/.*|
salt/ext/.*|
tests/kitchen/.*
)$

- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
rev: 1.16.0
hooks:
- id: blacken-docs
args: [--skip-errors]
files: ^doc/.*\.rst
additional_dependencies:
- black==22.6.0
- black==24.2.0

# <---- Code Formatting --------------------------------------------------------------------------------------------

# ----- Security -------------------------------------------------------------------------------------------------->
- repo: https://github.com/PyCQA/bandit
rev: "1.7.4"
rev: "1.7.7"
hooks:
- id: bandit
alias: bandit-salt
Expand All @@ -1715,7 +1714,7 @@ repos:
)$
additional_dependencies: ['importlib_metadata<5']
- repo: https://github.com/PyCQA/bandit
rev: "1.7.4"
rev: "1.7.7"
hooks:
- id: bandit
alias: bandit-tests
Expand All @@ -1728,7 +1727,7 @@ repos:

# ----- Pre-Commit ------------------------------------------------------------------------------------------------>
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
rev: v1.8.0
hooks:
- id: mypy
alias: mypy-tools
Expand All @@ -1748,7 +1747,7 @@ repos:
- python-tools-scripts==0.20.0

- repo: https://github.com/saltstack/mirrors-nox
rev: v2021.6.12
rev: v2022.11.21
hooks:
- id: nox
alias: lint-salt
Expand All @@ -1768,7 +1767,7 @@ repos:
- pip>=20.2.4,<21.2

- repo: https://github.com/saltstack/mirrors-nox
rev: v2021.6.12
rev: v2022.11.21
hooks:
- id: nox
alias: lint-tests
Expand Down
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
fileperms-default=0644

# File paths to ignore file permission. Glob patterns allowed.
fileperms-ignore-paths=setup.py,noxfile.py,tests/runtests.py,tests/jenkins*.py,tests/saltsh.py,tests/buildpackage.py,tests/unit/files/rosters/ansible/roster.py
fileperms-ignore-paths=setup.py,noxfile.py,tests/runtests.py,tests/saltsh.py,tests/buildpackage.py,tests/unit/files/rosters/ansible/roster.py

[BLACKLISTED-FUNCTIONS]

Expand Down
27 changes: 0 additions & 27 deletions Gemfile

This file was deleted.

7 changes: 7 additions & 0 deletions changelog/66147.removed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Removed deprecated code scheduled to be removed on 2024-01-01:

* ``TemporaryLoggingHandler`` and ``QueueHandler`` in ``salt/_logging/handlers.py``
* All of the ``salt/log`` package.
* The ``salt/modules/cassandra_mod.py`` module.
* The ``salt/returners/cassandra_return.py`` returner.
* The ``salt/returners/django_return.py`` returner.
18 changes: 0 additions & 18 deletions cicd/jenkins/pr-centosstream-9-x86_64-py3-cloud-pytest

This file was deleted.

49 changes: 0 additions & 49 deletions cicd/kitchen_template.yml

This file was deleted.

Loading
Loading