From 5ab8c6770d3c1bce431c04af369bb4521b7cf0ec Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 19:44:53 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- examples/auth.py | 1 + jira/__init__.py | 1 + jira/client.py | 7 ++++--- jira/config.py | 1 + jira/jirashell.py | 1 + jira/resources.py | 1 + jira/utils/__init__.py | 1 + make_local_jira_user.py | 1 + tests/tests.py | 1 + 9 files changed, 12 insertions(+), 3 deletions(-) diff --git a/examples/auth.py b/examples/auth.py index ec1d67a7b..cda716403 100644 --- a/examples/auth.py +++ b/examples/auth.py @@ -1,4 +1,5 @@ """Some simple authentication examples.""" + from __future__ import annotations from collections import Counter diff --git a/jira/__init__.py b/jira/__init__.py index a12411832..6ec4cff6e 100644 --- a/jira/__init__.py +++ b/jira/__init__.py @@ -1,4 +1,5 @@ """The root of JIRA package namespace.""" + from __future__ import annotations try: diff --git a/jira/client.py b/jira/client.py index 1c8534869..4cc845b72 100644 --- a/jira/client.py +++ b/jira/client.py @@ -5,6 +5,7 @@ will construct a JIRA object as described below. Full API documentation can be found at: https://jira.readthedocs.io/en/latest/. """ + from __future__ import annotations import calendar @@ -4092,9 +4093,9 @@ def deactivate_user(self, username: str) -> str | int: raise JIRAError(f"Error Deactivating {username}: {e}") else: url = self.server_url + "/secure/admin/user/EditUser.jspa" - self._options["headers"][ - "Content-Type" - ] = "application/x-www-form-urlencoded; charset=UTF-8" + self._options["headers"]["Content-Type"] = ( + "application/x-www-form-urlencoded; charset=UTF-8" + ) user = self.user(username) userInfo = { "inline": "true", diff --git a/jira/config.py b/jira/config.py index 225865ee8..8216c3119 100644 --- a/jira/config.py +++ b/jira/config.py @@ -5,6 +5,7 @@ Also, this simplifies the scripts by not having to write the same initialization code for each script. """ + from __future__ import annotations import configparser diff --git a/jira/jirashell.py b/jira/jirashell.py index 4701ce3d5..c78fc69d5 100644 --- a/jira/jirashell.py +++ b/jira/jirashell.py @@ -3,6 +3,7 @@ Script arguments support changing the server and a persistent authentication over HTTP BASIC or Kerberos. """ + from __future__ import annotations import argparse diff --git a/jira/resources.py b/jira/resources.py index 57ec31bbc..dfe1ba0f4 100644 --- a/jira/resources.py +++ b/jira/resources.py @@ -3,6 +3,7 @@ This module implements the Resource classes that translate JSON from Jira REST resources into usable objects. """ + from __future__ import annotations import json diff --git a/jira/utils/__init__.py b/jira/utils/__init__.py index c8945f3e4..cfa6b6189 100644 --- a/jira/utils/__init__.py +++ b/jira/utils/__init__.py @@ -1,4 +1,5 @@ """Jira utils used internally.""" + from __future__ import annotations import threading diff --git a/make_local_jira_user.py b/make_local_jira_user.py index 8b44e9023..d8f984e91 100644 --- a/make_local_jira_user.py +++ b/make_local_jira_user.py @@ -1,4 +1,5 @@ """Attempts to create a test user, as the empty JIRA instance isn't provisioned with one.""" + from __future__ import annotations import sys diff --git a/tests/tests.py b/tests/tests.py index fc101844a..f040150fa 100755 --- a/tests/tests.py +++ b/tests/tests.py @@ -8,6 +8,7 @@ resources/test_* : For tests related to resources test_* : For other tests of the non-resource elements of the jira package. """ + from __future__ import annotations import logging