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 <mwatkins@linuxfoundation.org>
###########
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.4.0
+ rev: v4.5.0
hooks:
- id: trailing-whitespace
##########
- 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:
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)
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.*
def token = t.tokenStore.generateNewToken("{}")
println token.plainValue
""".format(
- username, name
+ username, name
+ )
)
token: str = str(server.run_script(get_token))
"multi-key-dict",
"nodeenv",
"oauth2client",
- "openstacksdk<1.5.0",
+ "openstacksdk>=2.1.0",
"pbr",
"pyasn1",
"pyasn1-modules",