Skip to content

Commit

Permalink
ruff: add flake8-quotes (Q) and auto-run
Browse files Browse the repository at this point in the history
  • Loading branch information
Marshall-Hallenbeck committed Oct 13, 2023
1 parent 008b99a commit ae14929
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions nxc/modules/add_computer.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def do_ldaps_add(self, connection, context):
"userAccountControl": 0x1000,
"servicePrincipalName": spns,
"sAMAccountName": self.__computerName,
"unicodePwd": f'"{self.__computerPassword}"'.encode('utf-16-le')
"unicodePwd": f"{self.__computerPassword}".encode("utf-16-le")
}
tls = ldap3.Tls(validate=ssl.CERT_NONE, version=ssl.PROTOCOL_TLSv1_2, ciphers="ALL:@SECLEVEL=0")
ldap_server = ldap3.Server(connection.host, use_ssl=True, port=636, get_info=ldap3.ALL, tls=tls)
Expand All @@ -292,7 +292,7 @@ def do_ldaps_add(self, connection, context):
else:
result = c.add(
f"cn={self.__computerName},cn=Computers,dc={ldap_domain}",
['top', 'person', 'organizationalPerson', 'user', 'computer'],
["top", "person", "organizationalPerson", "user", "computer"],
ucd
)
if result:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ build-backend = "poetry.core.masonry.api"
# Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
# Other options: pep8-naming (N), flake8-annotations (ANN), flake8-blind-except (BLE), flake8-commas (COM), flake8-pyi (PYI), flake8-pytest-style (PT), etc
select = ["E", "F", "D", "UP", "YTT", "ASYNC", "B", "A", "C4", "ISC", "ICN", "PIE", "PT"]
select = ["E", "F", "D", "UP", "YTT", "ASYNC", "B", "A", "C4", "ISC", "ICN", "PIE", "PT", "Q"]
ignore = [ "E501", "F405", "F841", "D100", "D101", "D102", "D103", "D104", "D105", "D106", "D107", "D203", "D204", "D205", "D212", "D213", "D400", "D401", "D415", "D417", "D419"]

# Allow autofix for all enabled rules (when `--fix`) is provided.
Expand Down

0 comments on commit ae14929

Please sign in to comment.