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

Bump oracledb from 1.4 to 2.5.0 #79

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 11, 2024

Bumps oracledb from 1.4 to 2.5.0.

Release notes

Sourced from oracledb's releases.

v2.5.0

python-oracledb 2.5.0 is now released. This release adds a number of new features and corrects a number of issues. See the full release notes for all of the details.

v2.4.1

python-oracledb 2.4.1 is now released. This release addresses one reported issue. See the full release notes for all of the details.

v2.4.0

python-oracledb 2.4.0 is now released. This release adds support for Oracle Database 23ai pipelining and corrects a number of reported bugs. See the full release notes for all of the details.

v2.3.0

python-oracledb 2.3.0 is now released. This release adds support for a new VECTOR storage format (BINARY) available in Oracle Database 23.5. It also implements a number of other requested features and corrects a number of reported bugs. See the full release notes for all of the details.

v2.2.1

python-oracledb 2.2.1 is now released. This release addresses a number of reported issues. See the full release notes for all of the details.

v2.2.0

python-oracledb 2.2.0 is now released. This release adds support for VECTOR columns (new to Oracle Database 23ai) and INTERVAL YEAR TO MONTH columns, implements a number of other requested features and corrects a number of reported bugs. See the full release notes for all of the details.

v2.1.2

python-oracledb 2.1.2 is now released. This release addresses a number of reported issues. See the full release notes for all of the details.

v2.1.1

python-oracledb 2.1.1 is now released. This release addresses a number of reported issues. See the full release notes for all of the details.

v2.1.0

python-oracledb 2.1.0 is now released. This release adds support for additional features new to Oracle Database 23c and corrects a number of reported bugs. See the full release notes for all of the details.

v2.0.1

python-oracledb 2.0.1 is now released. This release addresses a number of reported issues. See the full release notes for all of the details.

v2.0.0

python-oracledb 2.0.0 is now released. This release adds support for asynchronous programming with asyncio and a large number of smaller enhancements and bug fixes. See the full release notes for all of the details.

v1.4.2

python-oracledb 1.4.2 is now released. This release addresses one issue and begins to supply pre-built binaries for Python 3.12. See the full release notes for all of the details.

v1.4.1

python-oracledb 1.4.1 is now released. This release addresses a number of reported issues. See the full release notes for all of the details.

Commits
  • e49c1c0 Add new environment variable.
  • 577785e Preparing to release python-oracledb 2.5.0.
  • c09352e Test improvements.
  • 3db2ee9 If ping fails, the request should not be marked as completed!
  • 41693a2 Further documentation improvements in preparation for release.
  • c31d791 Update ODPI-C.
  • 9a4801a Added support for application context in thin mode; tweak documentation
  • d9d4bee Remove use of encoding and nencoding in the documentation.
  • a9921bf Added support for setting the edition when connecting to Oracle
  • 791c399 Added more tests.
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Nov 11, 2024
@dependabot dependabot bot requested a review from a team as a code owner November 11, 2024 08:11
Copy link
Contributor

🚨 Linting errors found in Python code. Click to expand.
cli/__init__.py:143:1: SyntaxError: Expected an indented block after function definition
    |
143 | @click.command()
    | ^
144 | @click.option(
145 |     "-t",
    |

cli/ldap_cmds/rbac.py:9:5: F401 [*] `cli.ldap_cmds.ldap_connect` imported but unused
   |
 8 | from cli.ldap_cmds import (
 9 |     ldap_connect,
   |     ^^^^^^^^^^^^ F401
10 | )
11 | from cli import (
   |
   = help: Remove unused import: `cli.ldap_cmds.ldap_connect`

cli/ldap_cmds/rbac.py:143:23: F541 [*] f-string without any placeholders
    |
141 |         )
142 |     except Exception as e:
143 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
144 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:185:23: F541 [*] f-string without any placeholders
    |
183 |         )
184 |     except Exception as e:
185 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
186 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:244:23: F541 [*] f-string without any placeholders
    |
242 |         )
243 |     except Exception as e:
244 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
245 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:266:35: F841 [*] Local variable `no_such_object_e` is assigned to but never used
    |
264 |         )
265 |         tree.reverse()
266 |     except ldap.NO_SUCH_OBJECT as no_such_object_e:
    |                                   ^^^^^^^^^^^^^^^^ F841
267 |         log.debug("Entire policy ou does not exist, no need to delete child objects")
268 |         tree = None
    |
    = help: Remove assignment to unused variable `no_such_object_e`

cli/ldap_cmds/rbac.py:336:23: F541 [*] f-string without any placeholders
    |
334 |         )
335 |     except Exception as e:
336 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
337 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:361:39: F841 [*] Local variable `no_such_object_e` is assigned to but never used
    |
359 |             )
360 |             tree.reverse()
361 |         except ldap.NO_SUCH_OBJECT as no_such_object_e:
    |                                       ^^^^^^^^^^^^^^^^ F841
362 |             log.debug("Entire role ou does not exist, no need to delete child objects")
363 |             tree = None
    |
    = help: Remove assignment to unused variable `no_such_object_e`

cli/ldap_cmds/rbac.py:430:23: F541 [*] f-string without any placeholders
    |
428 |         )
429 |     except Exception as e:
430 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
431 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:446:43: F821 Undefined name `dn`
    |
444 |         # loop through the records
445 |         for entry in records.all_records:
446 |             log.info(f"Got entry record: {dn}")
    |                                           ^^ F821
447 |             # add the record to ldap
448 |             try:
    |

cli/ldap_cmds/rbac.py:474:23: F541 [*] f-string without any placeholders
    |
472 |         )
473 |     except Exception as e:
474 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
475 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:478:23: F541 [*] f-string without any placeholders
    |
477 |     except Exception as e:
478 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
479 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/user.py:14:24: F401 [*] `ldap.modlist` imported but unused
   |
12 | import ldap
13 | from ldap.controls import SimplePagedResultsControl
14 | import ldap.modlist as modlist
   |                        ^^^^^^^ F401
15 | 
16 | from cli.ldap_cmds import (
   |
   = help: Remove unused import: `ldap.modlist`

cli/ldap_cmds/user.py:22:5: F401 [*] `ldap3.DEREF_ALWAYS` imported but unused
   |
20 |     MODIFY_REPLACE,
21 |     MODIFY_DELETE,
22 |     DEREF_ALWAYS,
   |     ^^^^^^^^^^^^ F401
23 | )
   |
   = help: Remove unused import: `ldap3.DEREF_ALWAYS`

cli/ldap_cmds/user.py:157:23: F541 [*] f-string without any placeholders
    |
155 |             )
156 |     except Exception as e:
157 |         log.exception(f"Failed to add role to user")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
158 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/user.py:354:13: F841 Local variable `removed` is assigned to but never used
    |
352 |                 log.debug(ldap_connection_action.result)
353 |         elif remove:
354 |             removed = 0
    |             ^^^^^^^ F841
355 |             not_removed = 0
356 |             failed = 0
    |
    = help: Remove assignment to unused variable `removed`

cli/ldap_cmds/user.py:355:13: F841 Local variable `not_removed` is assigned to but never used
    |
353 |         elif remove:
354 |             removed = 0
355 |             not_removed = 0
    |             ^^^^^^^^^^^ F841
356 |             failed = 0
357 |             ldap_connection_action.delete(
    |
    = help: Remove assignment to unused variable `not_removed`

cli/ldap_cmds/user.py:437:13: E722 Do not use bare `except`
    |
435 |                 connection.commit()
436 |                 log.info("Committed changes to database successfully")
437 |             except:
    |             ^^^^^^ E722
438 |                 log.exception(f"Failed to update notes for user {user}")
439 |         connection.close()
    |

cli/ldap_cmds/user.py:528:26: F541 [*] f-string without any placeholders
    |
526 |     for user_dn in all_users:
527 |         try:
528 |             update_sql = f"UPDATE USER_ SET END_DATE=TRUNC(CURRENT_DATE) WHERE UPPER(DISTINGUISHED_NAME)=UPPER(:user_dn)"
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
529 |             update_cursor = connection.cursor()
530 |             update_cursor.execute(
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/user.py:538:9: E722 Do not use bare `except`
    |
536 |             connection.commit()
537 |             log.info("Committed changes to database successfully")
538 |         except:
    |         ^^^^^^ E722
539 |             log.exception(f"Failed to update END_DATE for user {user_dn}")
540 |     connection.close()
    |

Found 20 errors.
[*] 14 fixable with the `--fix` option (2 hidden fixes can be enabled with the `--unsafe-fixes` option).

Tip: You can run ruff check --fix to fix automatically fixable errors.

Copy link
Contributor

🚨 Python code is not properly formatted. Click to expand.
Would reformat: cli/ldap_cmds/user.py
1 file would be reformatted, 8 files already formatted

Please run ruff format to format the code.

1 similar comment
Copy link
Contributor

🚨 Python code is not properly formatted. Click to expand.
Would reformat: cli/ldap_cmds/user.py
1 file would be reformatted, 8 files already formatted

Please run ruff format to format the code.

Copy link
Contributor

🚨 Linting errors found in Python code. Click to expand.
cli/__init__.py:143:1: SyntaxError: Expected an indented block after function definition
    |
143 | @click.command()
    | ^
144 | @click.option(
145 |     "-t",
    |

cli/ldap_cmds/rbac.py:9:5: F401 [*] `cli.ldap_cmds.ldap_connect` imported but unused
   |
 8 | from cli.ldap_cmds import (
 9 |     ldap_connect,
   |     ^^^^^^^^^^^^ F401
10 | )
11 | from cli import (
   |
   = help: Remove unused import: `cli.ldap_cmds.ldap_connect`

cli/ldap_cmds/rbac.py:143:23: F541 [*] f-string without any placeholders
    |
141 |         )
142 |     except Exception as e:
143 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
144 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:185:23: F541 [*] f-string without any placeholders
    |
183 |         )
184 |     except Exception as e:
185 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
186 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:244:23: F541 [*] f-string without any placeholders
    |
242 |         )
243 |     except Exception as e:
244 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
245 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:266:35: F841 [*] Local variable `no_such_object_e` is assigned to but never used
    |
264 |         )
265 |         tree.reverse()
266 |     except ldap.NO_SUCH_OBJECT as no_such_object_e:
    |                                   ^^^^^^^^^^^^^^^^ F841
267 |         log.debug("Entire policy ou does not exist, no need to delete child objects")
268 |         tree = None
    |
    = help: Remove assignment to unused variable `no_such_object_e`

cli/ldap_cmds/rbac.py:336:23: F541 [*] f-string without any placeholders
    |
334 |         )
335 |     except Exception as e:
336 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
337 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:361:39: F841 [*] Local variable `no_such_object_e` is assigned to but never used
    |
359 |             )
360 |             tree.reverse()
361 |         except ldap.NO_SUCH_OBJECT as no_such_object_e:
    |                                       ^^^^^^^^^^^^^^^^ F841
362 |             log.debug("Entire role ou does not exist, no need to delete child objects")
363 |             tree = None
    |
    = help: Remove assignment to unused variable `no_such_object_e`

cli/ldap_cmds/rbac.py:430:23: F541 [*] f-string without any placeholders
    |
428 |         )
429 |     except Exception as e:
430 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
431 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:446:43: F821 Undefined name `dn`
    |
444 |         # loop through the records
445 |         for entry in records.all_records:
446 |             log.info(f"Got entry record: {dn}")
    |                                           ^^ F821
447 |             # add the record to ldap
448 |             try:
    |

cli/ldap_cmds/rbac.py:474:23: F541 [*] f-string without any placeholders
    |
472 |         )
473 |     except Exception as e:
474 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
475 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:478:23: F541 [*] f-string without any placeholders
    |
477 |     except Exception as e:
478 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
479 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/user.py:14:24: F401 [*] `ldap.modlist` imported but unused
   |
12 | import ldap
13 | from ldap.controls import SimplePagedResultsControl
14 | import ldap.modlist as modlist
   |                        ^^^^^^^ F401
15 | 
16 | from cli.ldap_cmds import (
   |
   = help: Remove unused import: `ldap.modlist`

cli/ldap_cmds/user.py:22:5: F401 [*] `ldap3.DEREF_ALWAYS` imported but unused
   |
20 |     MODIFY_REPLACE,
21 |     MODIFY_DELETE,
22 |     DEREF_ALWAYS,
   |     ^^^^^^^^^^^^ F401
23 | )
   |
   = help: Remove unused import: `ldap3.DEREF_ALWAYS`

cli/ldap_cmds/user.py:157:23: F541 [*] f-string without any placeholders
    |
155 |             )
156 |     except Exception as e:
157 |         log.exception(f"Failed to add role to user")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
158 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/user.py:354:13: F841 Local variable `removed` is assigned to but never used
    |
352 |                 log.debug(ldap_connection_action.result)
353 |         elif remove:
354 |             removed = 0
    |             ^^^^^^^ F841
355 |             not_removed = 0
356 |             failed = 0
    |
    = help: Remove assignment to unused variable `removed`

cli/ldap_cmds/user.py:355:13: F841 Local variable `not_removed` is assigned to but never used
    |
353 |         elif remove:
354 |             removed = 0
355 |             not_removed = 0
    |             ^^^^^^^^^^^ F841
356 |             failed = 0
357 |             ldap_connection_action.delete(
    |
    = help: Remove assignment to unused variable `not_removed`

cli/ldap_cmds/user.py:437:13: E722 Do not use bare `except`
    |
435 |                 connection.commit()
436 |                 log.info("Committed changes to database successfully")
437 |             except:
    |             ^^^^^^ E722
438 |                 log.exception(f"Failed to update notes for user {user}")
439 |         connection.close()
    |

cli/ldap_cmds/user.py:528:26: F541 [*] f-string without any placeholders
    |
526 |     for user_dn in all_users:
527 |         try:
528 |             update_sql = f"UPDATE USER_ SET END_DATE=TRUNC(CURRENT_DATE) WHERE UPPER(DISTINGUISHED_NAME)=UPPER(:user_dn)"
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
529 |             update_cursor = connection.cursor()
530 |             update_cursor.execute(
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/user.py:538:9: E722 Do not use bare `except`
    |
536 |             connection.commit()
537 |             log.info("Committed changes to database successfully")
538 |         except:
    |         ^^^^^^ E722
539 |             log.exception(f"Failed to update END_DATE for user {user_dn}")
540 |     connection.close()
    |

Found 20 errors.
[*] 14 fixable with the `--fix` option (2 hidden fixes can be enabled with the `--unsafe-fixes` option).

Tip: You can run ruff check --fix to fix automatically fixable errors.

Bumps [oracledb](https://github.com/oracle/python-oracledb) from 1.4 to 2.5.0.
- [Release notes](https://github.com/oracle/python-oracledb/releases)
- [Commits](oracle/python-oracledb@v1.4.0...v2.5.0)

---
updated-dependencies:
- dependency-name: oracledb
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/pip/dev/oracledb-2.5.0 branch from 2a7a1e2 to e759c19 Compare November 11, 2024 16:50
Copy link
Contributor

🚨 Python code is not properly formatted. Click to expand.
Would reformat: cli/ldap_cmds/user.py
1 file would be reformatted, 8 files already formatted

Please run ruff format to format the code.

1 similar comment
Copy link
Contributor

🚨 Python code is not properly formatted. Click to expand.
Would reformat: cli/ldap_cmds/user.py
1 file would be reformatted, 8 files already formatted

Please run ruff format to format the code.

Copy link
Contributor

🚨 Linting errors found in Python code. Click to expand.
cli/__init__.py:143:1: SyntaxError: Expected an indented block after function definition
    |
143 | @click.command()
    | ^
144 | @click.option(
145 |     "-t",
    |

cli/ldap_cmds/rbac.py:9:5: F401 [*] `cli.ldap_cmds.ldap_connect` imported but unused
   |
 8 | from cli.ldap_cmds import (
 9 |     ldap_connect,
   |     ^^^^^^^^^^^^ F401
10 | )
11 | from cli import (
   |
   = help: Remove unused import: `cli.ldap_cmds.ldap_connect`

cli/ldap_cmds/rbac.py:143:23: F541 [*] f-string without any placeholders
    |
141 |         )
142 |     except Exception as e:
143 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
144 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:185:23: F541 [*] f-string without any placeholders
    |
183 |         )
184 |     except Exception as e:
185 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
186 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:244:23: F541 [*] f-string without any placeholders
    |
242 |         )
243 |     except Exception as e:
244 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
245 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:266:35: F841 [*] Local variable `no_such_object_e` is assigned to but never used
    |
264 |         )
265 |         tree.reverse()
266 |     except ldap.NO_SUCH_OBJECT as no_such_object_e:
    |                                   ^^^^^^^^^^^^^^^^ F841
267 |         log.debug("Entire policy ou does not exist, no need to delete child objects")
268 |         tree = None
    |
    = help: Remove assignment to unused variable `no_such_object_e`

cli/ldap_cmds/rbac.py:336:23: F541 [*] f-string without any placeholders
    |
334 |         )
335 |     except Exception as e:
336 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
337 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:361:39: F841 [*] Local variable `no_such_object_e` is assigned to but never used
    |
359 |             )
360 |             tree.reverse()
361 |         except ldap.NO_SUCH_OBJECT as no_such_object_e:
    |                                       ^^^^^^^^^^^^^^^^ F841
362 |             log.debug("Entire role ou does not exist, no need to delete child objects")
363 |             tree = None
    |
    = help: Remove assignment to unused variable `no_such_object_e`

cli/ldap_cmds/rbac.py:430:23: F541 [*] f-string without any placeholders
    |
428 |         )
429 |     except Exception as e:
430 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
431 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:446:43: F821 Undefined name `dn`
    |
444 |         # loop through the records
445 |         for entry in records.all_records:
446 |             log.info(f"Got entry record: {dn}")
    |                                           ^^ F821
447 |             # add the record to ldap
448 |             try:
    |

cli/ldap_cmds/rbac.py:474:23: F541 [*] f-string without any placeholders
    |
472 |         )
473 |     except Exception as e:
474 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
475 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:478:23: F541 [*] f-string without any placeholders
    |
477 |     except Exception as e:
478 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
479 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/user.py:14:24: F401 [*] `ldap.modlist` imported but unused
   |
12 | import ldap
13 | from ldap.controls import SimplePagedResultsControl
14 | import ldap.modlist as modlist
   |                        ^^^^^^^ F401
15 | 
16 | from cli.ldap_cmds import (
   |
   = help: Remove unused import: `ldap.modlist`

cli/ldap_cmds/user.py:22:5: F401 [*] `ldap3.DEREF_ALWAYS` imported but unused
   |
20 |     MODIFY_REPLACE,
21 |     MODIFY_DELETE,
22 |     DEREF_ALWAYS,
   |     ^^^^^^^^^^^^ F401
23 | )
   |
   = help: Remove unused import: `ldap3.DEREF_ALWAYS`

cli/ldap_cmds/user.py:157:23: F541 [*] f-string without any placeholders
    |
155 |             )
156 |     except Exception as e:
157 |         log.exception(f"Failed to add role to user")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
158 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/user.py:354:13: F841 Local variable `removed` is assigned to but never used
    |
352 |                 log.debug(ldap_connection_action.result)
353 |         elif remove:
354 |             removed = 0
    |             ^^^^^^^ F841
355 |             not_removed = 0
356 |             failed = 0
    |
    = help: Remove assignment to unused variable `removed`

cli/ldap_cmds/user.py:355:13: F841 Local variable `not_removed` is assigned to but never used
    |
353 |         elif remove:
354 |             removed = 0
355 |             not_removed = 0
    |             ^^^^^^^^^^^ F841
356 |             failed = 0
357 |             ldap_connection_action.delete(
    |
    = help: Remove assignment to unused variable `not_removed`

cli/ldap_cmds/user.py:437:13: E722 Do not use bare `except`
    |
435 |                 connection.commit()
436 |                 log.info("Committed changes to database successfully")
437 |             except:
    |             ^^^^^^ E722
438 |                 log.exception(f"Failed to update notes for user {user}")
439 |         connection.close()
    |

cli/ldap_cmds/user.py:528:26: F541 [*] f-string without any placeholders
    |
526 |     for user_dn in all_users:
527 |         try:
528 |             update_sql = f"UPDATE USER_ SET END_DATE=TRUNC(CURRENT_DATE) WHERE UPPER(DISTINGUISHED_NAME)=UPPER(:user_dn)"
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
529 |             update_cursor = connection.cursor()
530 |             update_cursor.execute(
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/user.py:538:9: E722 Do not use bare `except`
    |
536 |             connection.commit()
537 |             log.info("Committed changes to database successfully")
538 |         except:
    |         ^^^^^^ E722
539 |             log.exception(f"Failed to update END_DATE for user {user_dn}")
540 |     connection.close()
    |

Found 20 errors.
[*] 14 fixable with the `--fix` option (2 hidden fixes can be enabled with the `--unsafe-fixes` option).

Tip: You can run ruff check --fix to fix automatically fixable errors.

2 similar comments
Copy link
Contributor

🚨 Linting errors found in Python code. Click to expand.
cli/__init__.py:143:1: SyntaxError: Expected an indented block after function definition
    |
143 | @click.command()
    | ^
144 | @click.option(
145 |     "-t",
    |

cli/ldap_cmds/rbac.py:9:5: F401 [*] `cli.ldap_cmds.ldap_connect` imported but unused
   |
 8 | from cli.ldap_cmds import (
 9 |     ldap_connect,
   |     ^^^^^^^^^^^^ F401
10 | )
11 | from cli import (
   |
   = help: Remove unused import: `cli.ldap_cmds.ldap_connect`

cli/ldap_cmds/rbac.py:143:23: F541 [*] f-string without any placeholders
    |
141 |         )
142 |     except Exception as e:
143 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
144 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:185:23: F541 [*] f-string without any placeholders
    |
183 |         )
184 |     except Exception as e:
185 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
186 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:244:23: F541 [*] f-string without any placeholders
    |
242 |         )
243 |     except Exception as e:
244 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
245 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:266:35: F841 [*] Local variable `no_such_object_e` is assigned to but never used
    |
264 |         )
265 |         tree.reverse()
266 |     except ldap.NO_SUCH_OBJECT as no_such_object_e:
    |                                   ^^^^^^^^^^^^^^^^ F841
267 |         log.debug("Entire policy ou does not exist, no need to delete child objects")
268 |         tree = None
    |
    = help: Remove assignment to unused variable `no_such_object_e`

cli/ldap_cmds/rbac.py:336:23: F541 [*] f-string without any placeholders
    |
334 |         )
335 |     except Exception as e:
336 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
337 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:361:39: F841 [*] Local variable `no_such_object_e` is assigned to but never used
    |
359 |             )
360 |             tree.reverse()
361 |         except ldap.NO_SUCH_OBJECT as no_such_object_e:
    |                                       ^^^^^^^^^^^^^^^^ F841
362 |             log.debug("Entire role ou does not exist, no need to delete child objects")
363 |             tree = None
    |
    = help: Remove assignment to unused variable `no_such_object_e`

cli/ldap_cmds/rbac.py:430:23: F541 [*] f-string without any placeholders
    |
428 |         )
429 |     except Exception as e:
430 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
431 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:446:43: F821 Undefined name `dn`
    |
444 |         # loop through the records
445 |         for entry in records.all_records:
446 |             log.info(f"Got entry record: {dn}")
    |                                           ^^ F821
447 |             # add the record to ldap
448 |             try:
    |

cli/ldap_cmds/rbac.py:474:23: F541 [*] f-string without any placeholders
    |
472 |         )
473 |     except Exception as e:
474 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
475 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:478:23: F541 [*] f-string without any placeholders
    |
477 |     except Exception as e:
478 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
479 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/user.py:14:24: F401 [*] `ldap.modlist` imported but unused
   |
12 | import ldap
13 | from ldap.controls import SimplePagedResultsControl
14 | import ldap.modlist as modlist
   |                        ^^^^^^^ F401
15 | 
16 | from cli.ldap_cmds import (
   |
   = help: Remove unused import: `ldap.modlist`

cli/ldap_cmds/user.py:22:5: F401 [*] `ldap3.DEREF_ALWAYS` imported but unused
   |
20 |     MODIFY_REPLACE,
21 |     MODIFY_DELETE,
22 |     DEREF_ALWAYS,
   |     ^^^^^^^^^^^^ F401
23 | )
   |
   = help: Remove unused import: `ldap3.DEREF_ALWAYS`

cli/ldap_cmds/user.py:157:23: F541 [*] f-string without any placeholders
    |
155 |             )
156 |     except Exception as e:
157 |         log.exception(f"Failed to add role to user")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
158 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/user.py:354:13: F841 Local variable `removed` is assigned to but never used
    |
352 |                 log.debug(ldap_connection_action.result)
353 |         elif remove:
354 |             removed = 0
    |             ^^^^^^^ F841
355 |             not_removed = 0
356 |             failed = 0
    |
    = help: Remove assignment to unused variable `removed`

cli/ldap_cmds/user.py:355:13: F841 Local variable `not_removed` is assigned to but never used
    |
353 |         elif remove:
354 |             removed = 0
355 |             not_removed = 0
    |             ^^^^^^^^^^^ F841
356 |             failed = 0
357 |             ldap_connection_action.delete(
    |
    = help: Remove assignment to unused variable `not_removed`

cli/ldap_cmds/user.py:437:13: E722 Do not use bare `except`
    |
435 |                 connection.commit()
436 |                 log.info("Committed changes to database successfully")
437 |             except:
    |             ^^^^^^ E722
438 |                 log.exception(f"Failed to update notes for user {user}")
439 |         connection.close()
    |

cli/ldap_cmds/user.py:528:26: F541 [*] f-string without any placeholders
    |
526 |     for user_dn in all_users:
527 |         try:
528 |             update_sql = f"UPDATE USER_ SET END_DATE=TRUNC(CURRENT_DATE) WHERE UPPER(DISTINGUISHED_NAME)=UPPER(:user_dn)"
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
529 |             update_cursor = connection.cursor()
530 |             update_cursor.execute(
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/user.py:538:9: E722 Do not use bare `except`
    |
536 |             connection.commit()
537 |             log.info("Committed changes to database successfully")
538 |         except:
    |         ^^^^^^ E722
539 |             log.exception(f"Failed to update END_DATE for user {user_dn}")
540 |     connection.close()
    |

Found 20 errors.
[*] 14 fixable with the `--fix` option (2 hidden fixes can be enabled with the `--unsafe-fixes` option).

Tip: You can run ruff check --fix to fix automatically fixable errors.

Copy link
Contributor

🚨 Linting errors found in Python code. Click to expand.
cli/__init__.py:143:1: SyntaxError: Expected an indented block after function definition
    |
143 | @click.command()
    | ^
144 | @click.option(
145 |     "-t",
    |

cli/ldap_cmds/rbac.py:9:5: F401 [*] `cli.ldap_cmds.ldap_connect` imported but unused
   |
 8 | from cli.ldap_cmds import (
 9 |     ldap_connect,
   |     ^^^^^^^^^^^^ F401
10 | )
11 | from cli import (
   |
   = help: Remove unused import: `cli.ldap_cmds.ldap_connect`

cli/ldap_cmds/rbac.py:143:23: F541 [*] f-string without any placeholders
    |
141 |         )
142 |     except Exception as e:
143 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
144 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:185:23: F541 [*] f-string without any placeholders
    |
183 |         )
184 |     except Exception as e:
185 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
186 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:244:23: F541 [*] f-string without any placeholders
    |
242 |         )
243 |     except Exception as e:
244 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
245 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:266:35: F841 [*] Local variable `no_such_object_e` is assigned to but never used
    |
264 |         )
265 |         tree.reverse()
266 |     except ldap.NO_SUCH_OBJECT as no_such_object_e:
    |                                   ^^^^^^^^^^^^^^^^ F841
267 |         log.debug("Entire policy ou does not exist, no need to delete child objects")
268 |         tree = None
    |
    = help: Remove assignment to unused variable `no_such_object_e`

cli/ldap_cmds/rbac.py:336:23: F541 [*] f-string without any placeholders
    |
334 |         )
335 |     except Exception as e:
336 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
337 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:361:39: F841 [*] Local variable `no_such_object_e` is assigned to but never used
    |
359 |             )
360 |             tree.reverse()
361 |         except ldap.NO_SUCH_OBJECT as no_such_object_e:
    |                                       ^^^^^^^^^^^^^^^^ F841
362 |             log.debug("Entire role ou does not exist, no need to delete child objects")
363 |             tree = None
    |
    = help: Remove assignment to unused variable `no_such_object_e`

cli/ldap_cmds/rbac.py:430:23: F541 [*] f-string without any placeholders
    |
428 |         )
429 |     except Exception as e:
430 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
431 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:446:43: F821 Undefined name `dn`
    |
444 |         # loop through the records
445 |         for entry in records.all_records:
446 |             log.info(f"Got entry record: {dn}")
    |                                           ^^ F821
447 |             # add the record to ldap
448 |             try:
    |

cli/ldap_cmds/rbac.py:474:23: F541 [*] f-string without any placeholders
    |
472 |         )
473 |     except Exception as e:
474 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
475 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:478:23: F541 [*] f-string without any placeholders
    |
477 |     except Exception as e:
478 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
479 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/user.py:14:24: F401 [*] `ldap.modlist` imported but unused
   |
12 | import ldap
13 | from ldap.controls import SimplePagedResultsControl
14 | import ldap.modlist as modlist
   |                        ^^^^^^^ F401
15 | 
16 | from cli.ldap_cmds import (
   |
   = help: Remove unused import: `ldap.modlist`

cli/ldap_cmds/user.py:22:5: F401 [*] `ldap3.DEREF_ALWAYS` imported but unused
   |
20 |     MODIFY_REPLACE,
21 |     MODIFY_DELETE,
22 |     DEREF_ALWAYS,
   |     ^^^^^^^^^^^^ F401
23 | )
   |
   = help: Remove unused import: `ldap3.DEREF_ALWAYS`

cli/ldap_cmds/user.py:157:23: F541 [*] f-string without any placeholders
    |
155 |             )
156 |     except Exception as e:
157 |         log.exception(f"Failed to add role to user")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
158 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/user.py:354:13: F841 Local variable `removed` is assigned to but never used
    |
352 |                 log.debug(ldap_connection_action.result)
353 |         elif remove:
354 |             removed = 0
    |             ^^^^^^^ F841
355 |             not_removed = 0
356 |             failed = 0
    |
    = help: Remove assignment to unused variable `removed`

cli/ldap_cmds/user.py:355:13: F841 Local variable `not_removed` is assigned to but never used
    |
353 |         elif remove:
354 |             removed = 0
355 |             not_removed = 0
    |             ^^^^^^^^^^^ F841
356 |             failed = 0
357 |             ldap_connection_action.delete(
    |
    = help: Remove assignment to unused variable `not_removed`

cli/ldap_cmds/user.py:437:13: E722 Do not use bare `except`
    |
435 |                 connection.commit()
436 |                 log.info("Committed changes to database successfully")
437 |             except:
    |             ^^^^^^ E722
438 |                 log.exception(f"Failed to update notes for user {user}")
439 |         connection.close()
    |

cli/ldap_cmds/user.py:528:26: F541 [*] f-string without any placeholders
    |
526 |     for user_dn in all_users:
527 |         try:
528 |             update_sql = f"UPDATE USER_ SET END_DATE=TRUNC(CURRENT_DATE) WHERE UPPER(DISTINGUISHED_NAME)=UPPER(:user_dn)"
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
529 |             update_cursor = connection.cursor()
530 |             update_cursor.execute(
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/user.py:538:9: E722 Do not use bare `except`
    |
536 |             connection.commit()
537 |             log.info("Committed changes to database successfully")
538 |         except:
    |         ^^^^^^ E722
539 |             log.exception(f"Failed to update END_DATE for user {user_dn}")
540 |     connection.close()
    |

Found 20 errors.
[*] 14 fixable with the `--fix` option (2 hidden fixes can be enabled with the `--unsafe-fixes` option).

Tip: You can run ruff check --fix to fix automatically fixable errors.

Copy link
Contributor

🚨 Python code is not properly formatted. Click to expand.
Would reformat: cli/ldap_cmds/user.py
1 file would be reformatted, 8 files already formatted

Please run ruff format to format the code.

1 similar comment
Copy link
Contributor

🚨 Python code is not properly formatted. Click to expand.
Would reformat: cli/ldap_cmds/user.py
1 file would be reformatted, 8 files already formatted

Please run ruff format to format the code.

Copy link
Contributor

🚨 Linting errors found in Python code. Click to expand.
cli/__init__.py:143:1: SyntaxError: Expected an indented block after function definition
    |
143 | @click.command()
    | ^
144 | @click.option(
145 |     "-t",
    |

cli/ldap_cmds/rbac.py:9:5: F401 [*] `cli.ldap_cmds.ldap_connect` imported but unused
   |
 8 | from cli.ldap_cmds import (
 9 |     ldap_connect,
   |     ^^^^^^^^^^^^ F401
10 | )
11 | from cli import (
   |
   = help: Remove unused import: `cli.ldap_cmds.ldap_connect`

cli/ldap_cmds/rbac.py:143:23: F541 [*] f-string without any placeholders
    |
141 |         )
142 |     except Exception as e:
143 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
144 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:185:23: F541 [*] f-string without any placeholders
    |
183 |         )
184 |     except Exception as e:
185 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
186 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:244:23: F541 [*] f-string without any placeholders
    |
242 |         )
243 |     except Exception as e:
244 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
245 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:266:35: F841 [*] Local variable `no_such_object_e` is assigned to but never used
    |
264 |         )
265 |         tree.reverse()
266 |     except ldap.NO_SUCH_OBJECT as no_such_object_e:
    |                                   ^^^^^^^^^^^^^^^^ F841
267 |         log.debug("Entire policy ou does not exist, no need to delete child objects")
268 |         tree = None
    |
    = help: Remove assignment to unused variable `no_such_object_e`

cli/ldap_cmds/rbac.py:336:23: F541 [*] f-string without any placeholders
    |
334 |         )
335 |     except Exception as e:
336 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
337 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:361:39: F841 [*] Local variable `no_such_object_e` is assigned to but never used
    |
359 |             )
360 |             tree.reverse()
361 |         except ldap.NO_SUCH_OBJECT as no_such_object_e:
    |                                       ^^^^^^^^^^^^^^^^ F841
362 |             log.debug("Entire role ou does not exist, no need to delete child objects")
363 |             tree = None
    |
    = help: Remove assignment to unused variable `no_such_object_e`

cli/ldap_cmds/rbac.py:430:23: F541 [*] f-string without any placeholders
    |
428 |         )
429 |     except Exception as e:
430 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
431 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:446:43: F821 Undefined name `dn`
    |
444 |         # loop through the records
445 |         for entry in records.all_records:
446 |             log.info(f"Got entry record: {dn}")
    |                                           ^^ F821
447 |             # add the record to ldap
448 |             try:
    |

cli/ldap_cmds/rbac.py:474:23: F541 [*] f-string without any placeholders
    |
472 |         )
473 |     except Exception as e:
474 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
475 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/rbac.py:478:23: F541 [*] f-string without any placeholders
    |
477 |     except Exception as e:
478 |         log.exception(f"Failed to connect to ldap")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
479 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/user.py:14:24: F401 [*] `ldap.modlist` imported but unused
   |
12 | import ldap
13 | from ldap.controls import SimplePagedResultsControl
14 | import ldap.modlist as modlist
   |                        ^^^^^^^ F401
15 | 
16 | from cli.ldap_cmds import (
   |
   = help: Remove unused import: `ldap.modlist`

cli/ldap_cmds/user.py:22:5: F401 [*] `ldap3.DEREF_ALWAYS` imported but unused
   |
20 |     MODIFY_REPLACE,
21 |     MODIFY_DELETE,
22 |     DEREF_ALWAYS,
   |     ^^^^^^^^^^^^ F401
23 | )
   |
   = help: Remove unused import: `ldap3.DEREF_ALWAYS`

cli/ldap_cmds/user.py:157:23: F541 [*] f-string without any placeholders
    |
155 |             )
156 |     except Exception as e:
157 |         log.exception(f"Failed to add role to user")
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
158 |         raise e
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/user.py:354:13: F841 Local variable `removed` is assigned to but never used
    |
352 |                 log.debug(ldap_connection_action.result)
353 |         elif remove:
354 |             removed = 0
    |             ^^^^^^^ F841
355 |             not_removed = 0
356 |             failed = 0
    |
    = help: Remove assignment to unused variable `removed`

cli/ldap_cmds/user.py:355:13: F841 Local variable `not_removed` is assigned to but never used
    |
353 |         elif remove:
354 |             removed = 0
355 |             not_removed = 0
    |             ^^^^^^^^^^^ F841
356 |             failed = 0
357 |             ldap_connection_action.delete(
    |
    = help: Remove assignment to unused variable `not_removed`

cli/ldap_cmds/user.py:437:13: E722 Do not use bare `except`
    |
435 |                 connection.commit()
436 |                 log.info("Committed changes to database successfully")
437 |             except:
    |             ^^^^^^ E722
438 |                 log.exception(f"Failed to update notes for user {user}")
439 |         connection.close()
    |

cli/ldap_cmds/user.py:528:26: F541 [*] f-string without any placeholders
    |
526 |     for user_dn in all_users:
527 |         try:
528 |             update_sql = f"UPDATE USER_ SET END_DATE=TRUNC(CURRENT_DATE) WHERE UPPER(DISTINGUISHED_NAME)=UPPER(:user_dn)"
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ F541
529 |             update_cursor = connection.cursor()
530 |             update_cursor.execute(
    |
    = help: Remove extraneous `f` prefix

cli/ldap_cmds/user.py:538:9: E722 Do not use bare `except`
    |
536 |             connection.commit()
537 |             log.info("Committed changes to database successfully")
538 |         except:
    |         ^^^^^^ E722
539 |             log.exception(f"Failed to update END_DATE for user {user_dn}")
540 |     connection.close()
    |

Found 20 errors.
[*] 14 fixable with the `--fix` option (2 hidden fixes can be enabled with the `--unsafe-fixes` option).

Tip: You can run ruff check --fix to fix automatically fixable errors.

@georgepstaylor
Copy link
Member

@dependabot rebase

Copy link
Contributor Author

dependabot bot commented on behalf of github Nov 12, 2024

Looks like this PR is already up-to-date with dev! If you'd still like to recreate it from scratch, overwriting any edits, you can request @dependabot recreate.

Copy link
Contributor Author

dependabot bot commented on behalf of github Dec 16, 2024

Superseded by #98.

@dependabot dependabot bot closed this Dec 16, 2024
@dependabot dependabot bot deleted the dependabot/pip/dev/oracledb-2.5.0 branch December 16, 2024 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant