Skip to content

Commit

Permalink
Chore: Update openstacksdk from <1.5.0 to >=2.1.0
Browse files Browse the repository at this point in the history
Also, updated linting tool versions with pre-commit autoupdate.
Addressed minor type checking issue flagged by flake8.
Minor file formatting changes implemented via linting.

Issue: IT-26453
Change-Id: If9f941326c3f105d71fd0014d900653633d886ea
Signed-off-by: Matthew Watkins <[email protected]>
  • Loading branch information
ModeSevenIndustrialSolutions committed Feb 12, 2024
1 parent ac69f2a commit 208f2cf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:
###########

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace

Expand All @@ -19,23 +19,23 @@ repos:
##########

- repo: https://github.com/ambv/black
rev: 23.3.0
rev: 24.1.1
hooks:
- id: black

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 7.0.0
hooks:
- id: flake8
args: ["--max-line-length=120"]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.2.0
rev: v1.8.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
2 changes: 1 addition & 1 deletion lftools/cli/ldap_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def ldap_connect(ldap_object):
ldap_object.protocol_version = ldap.VERSION3
ldap_object.simple_bind_s()
except ldap.LDAPError as e:
if type(e.message) == dict and "desc" in e.message:
if type(e.message) is dict and "desc" in e.message:
print(e.message["desc"])
else:
print(e)
Expand Down
6 changes: 4 additions & 2 deletions lftools/jenkins/token.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def get_token(name: str, url: str, username: str, password: str, change: bool =

server: jenkins.Jenkins = jenkins.Jenkins(url, username=username, password=password) # type: ignore

get_token: str = """
get_token: str = (
"""
import hudson.model.*
import jenkins.model.*
import jenkins.security.*
Expand All @@ -43,7 +44,8 @@ def get_token(name: str, url: str, username: str, password: str, change: bool =
def token = t.tokenStore.generateNewToken("{}")
println token.plainValue
""".format(
username, name
username, name
)
)

token: str = str(server.run_script(get_token))
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ dependencies = [
"multi-key-dict",
"nodeenv",
"oauth2client",
"openstacksdk<1.5.0",
"openstacksdk>=2.1.0",
"pbr",
"pyasn1",
"pyasn1-modules",
Expand Down

0 comments on commit 208f2cf

Please sign in to comment.