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

Migrate Sqlalcehmy to the v2 #746

Merged
merged 9 commits into from
Mar 11, 2024
Merged

Conversation

Kwaizer
Copy link
Contributor

@Kwaizer Kwaizer commented Mar 5, 2024

Resolves: AlmaLinux/build-system#203

What has been done:

  • Configured fastapi-users-db-sqlalchemy and SQLAlchemy to the latest versions (6.0.1 and 2.0.27 respectively) in requirements.txt
  • Added DeclarativeBase and MetaData (for Base) in database.py to replace declarative_base() for Base and PulpBase
  • AsyncAttrs
  • Replaced declarative use of Column with mapped_column() in models.py and pulp_models.py
  • Type hints for tables in models.py and pulp_models.py

Copy link

github-actions bot commented Mar 5, 2024

pylint output
************* Module alws.config
alws/config.py:1:0: C0114: Missing module docstring (missing-module-docstring)
alws/config.py:7:0: C0115: Missing class docstring (missing-class-docstring)
alws/config.py:72:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/config.py:76:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/config.py:83:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module alws.constants
alws/constants.py:207:0: C0301: Line too long (95/80) (line-too-long)
alws/constants.py:1:0: C0114: Missing module docstring (missing-module-docstring)
alws/constants.py:47:0: C0115: Missing class docstring (missing-class-docstring)
alws/constants.py:54:0: C0115: Missing class docstring (missing-class-docstring)
alws/constants.py:79:0: C0115: Missing class docstring (missing-class-docstring)
alws/constants.py:88:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/constants.py:92:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/constants.py:103:0: C0115: Missing class docstring (missing-class-docstring)
alws/constants.py:111:0: C0115: Missing class docstring (missing-class-docstring)
alws/constants.py:118:0: C0115: Missing class docstring (missing-class-docstring)
alws/constants.py:119:4: C0103: Class constant name "proposal" doesn't conform to UPPER_CASE naming style (invalid-name)
alws/constants.py:120:4: C0103: Class constant name "skipped" doesn't conform to UPPER_CASE naming style (invalid-name)
alws/constants.py:121:4: C0103: Class constant name "released" doesn't conform to UPPER_CASE naming style (invalid-name)
alws/constants.py:122:4: C0103: Class constant name "approved" doesn't conform to UPPER_CASE naming style (invalid-name)
alws/constants.py:125:0: C0115: Missing class docstring (missing-class-docstring)
alws/constants.py:126:4: C0103: Class constant name "cve" doesn't conform to UPPER_CASE naming style (invalid-name)
alws/constants.py:127:4: C0103: Class constant name "rhsa" doesn't conform to UPPER_CASE naming style (invalid-name)
alws/constants.py:128:4: C0103: Class constant name "self_ref" doesn't conform to UPPER_CASE naming style (invalid-name)
alws/constants.py:129:4: C0103: Class constant name "bugzilla" doesn't conform to UPPER_CASE naming style (invalid-name)
alws/constants.py:132:0: C0115: Missing class docstring (missing-class-docstring)
alws/constants.py:139:0: C0115: Missing class docstring (missing-class-docstring)
alws/constants.py:147:0: C0115: Missing class docstring (missing-class-docstring)
alws/constants.py:154:0: C0115: Missing class docstring (missing-class-docstring)
alws/constants.py:161:0: C0115: Missing class docstring (missing-class-docstring)
alws/constants.py:168:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/constants.py:172:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/constants.py:176:0: C0115: Missing class docstring (missing-class-docstring)
alws/constants.py:183:0: C0115: Missing class docstring (missing-class-docstring)
alws/constants.py:190:0: C0115: Missing class docstring (missing-class-docstring)
alws/constants.py:197:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/constants.py:201:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/constants.py:206:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/constants.py:11:4: E0603: Undefined variable name 'DRAMATIQ_GEN_KEY_TASK_TIMEOUT' in __all__ (undefined-all-variable)
************* Module alws.crud.build_node
alws/crud/build_node.py:1051:0: C0301: Line too long (86/80) (line-too-long)
alws/crud/build_node.py:1:0: C0302: Too many lines in module (1065/1000) (too-many-lines)
alws/crud/build_node.py:39:9: W0511: TODO: here should be config value (fixme)
alws/crud/build_node.py:678:9: W0511: TODO: Beholder doesn't have authorization right now (fixme)
alws/crud/build_node.py:1051:5: W0511: TODO: ALBS-705: Temporary solution that fixes integrity error with missing srpm, (fixme)
alws/crud/build_node.py:1:0: C0114: Missing module docstring (missing-module-docstring)
alws/crud/build_node.py:34:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/build_node.py:88:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/build_node.py:89:4: W0613: Unused argument 'db' (unused-argument)
alws/crud/build_node.py:96:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/build_node.py:117:4: C0206: Consider iterating with .items() (consider-using-dict-items)
alws/crud/build_node.py:126:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/build_node.py:126:0: R0914: Too many local variables (16/15) (too-many-locals)
alws/crud/build_node.py:183:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/build_node.py:211:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/build_node.py:229:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/build_node.py:238:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/build_node.py:276:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/build_node.py:284:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/build_node.py:309:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/build_node.py:323:0: R0913: Too many arguments (9/5) (too-many-arguments)
alws/crud/build_node.py:323:0: R0914: Too many local variables (40/15) (too-many-locals)
alws/crud/build_node.py:373:12: W0707: Consider explicitly re-raising using 'raise ArtifactConversionError(f'Cannot put RPM packages into Pulp storage: {e}') from e' (raise-missing-from)
alws/crud/build_node.py:385:12: W0707: Consider explicitly re-raising using 'except Exception as exc' and 'raise RepositoryAddError(f'Cannot add RPM packages to the repository {str(repo)}') from exc' (raise-missing-from)
alws/crud/build_node.py:474:12: W0715: Exception arguments suggest string formatting might be intended (raising-format-tuple)
alws/crud/build_node.py:323:0: R0912: Too many branches (24/12) (too-many-branches)
alws/crud/build_node.py:323:0: R0915: Too many statements (70/50) (too-many-statements)
alws/crud/build_node.py:496:8: W0707: Consider explicitly re-raising using 'raise ArtifactConversionError(f'Cannot create log files for {str(repository)}, error: {str(e)}') from e' (raise-missing-from)
alws/crud/build_node.py:518:8: W0707: Consider explicitly re-raising using 'raise RepositoryAddError('Cannot save build log into Pulp repository: %s', str(e)) from e' (raise-missing-from)
alws/crud/build_node.py:518:8: W0715: Exception arguments suggest string formatting might be intended (raising-format-tuple)
alws/crud/build_node.py:524:0: R0913: Too many arguments (6/5) (too-many-arguments)
alws/crud/build_node.py:524:0: R0914: Too many local variables (32/15) (too-many-locals)
alws/crud/build_node.py:524:0: R0915: Too many statements (81/50) (too-many-statements)
alws/crud/build_node.py:808:19: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
alws/crud/build_node.py:843:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/build_node.py:884:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/build_node.py:902:11: W0718: Catching too general exception Exception (broad-exception-caught)
alws/crud/build_node.py:960:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/build_node.py:960:0: R0914: Too many local variables (16/15) (too-many-locals)
************* Module alws.crud.errata
alws/crud/errata.py:1:0: C0302: Too many lines in module (1633/1000) (too-many-lines)
alws/crud/errata.py:63:5: W0511: FIXME: ovallib dependency should stay optional (fixme)
alws/crud/errata.py:157:5: W0511: TODO: (fixme)
alws/crud/errata.py:216:29: W0511: TODO: Add test mapping here (fixme)
alws/crud/errata.py:1295:1: W0511: TODO: Check db_record (fixme)
alws/crud/errata.py:631:29: W1401: Anomalous backslash in string: '\d'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
alws/crud/errata.py:631:31: W1401: Anomalous backslash in string: '\w'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
alws/crud/errata.py:631:33: W1401: Anomalous backslash in string: '\-'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
alws/crud/errata.py:631:35: W1401: Anomalous backslash in string: '\_'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
alws/crud/errata.py:631:41: W1401: Anomalous backslash in string: '\d'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
alws/crud/errata.py:631:43: W1401: Anomalous backslash in string: '\.'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
alws/crud/errata.py:631:45: W1401: Anomalous backslash in string: '\w'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
alws/crud/errata.py:1:0: C0114: Missing module docstring (missing-module-docstring)
alws/crud/errata.py:19:0: E0401: Unable to import 'createrepo_c' (import-error)
alws/crud/errata.py:89:0: C0115: Missing class docstring (missing-class-docstring)
alws/crud/errata.py:94:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:89:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/crud/errata.py:119:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:148:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:148:0: R0914: Too many local variables (33/15) (too-many-locals)
alws/crud/errata.py:168:4: R1702: Too many nested blocks (7/5) (too-many-nested-blocks)
alws/crud/errata.py:148:0: R0912: Too many branches (47/12) (too-many-branches)
alws/crud/errata.py:148:0: R0915: Too many statements (118/50) (too-many-statements)
alws/crud/errata.py:403:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:416:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:416:0: R0912: Too many branches (13/12) (too-many-branches)
alws/crud/errata.py:475:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:503:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:503:0: R0914: Too many local variables (21/15) (too-many-locals)
alws/crud/errata.py:612:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:612:0: R0914: Too many local variables (21/15) (too-many-locals)
alws/crud/errata.py:762:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:788:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:788:0: R0913: Too many arguments (9/5) (too-many-arguments)
alws/crud/errata.py:820:23: E1102: func.count is not callable (not-callable)
alws/crud/errata.py:862:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:903:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:903:0: R0913: Too many arguments (7/5) (too-many-arguments)
alws/crud/errata.py:903:0: R0914: Too many local variables (25/15) (too-many-locals)
alws/crud/errata.py:1033:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:1099:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:1165:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:1165:0: R0914: Too many local variables (19/15) (too-many-locals)
alws/crud/errata.py:1218:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:1277:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:1296:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:1296:0: R0913: Too many arguments (7/5) (too-many-arguments)
alws/crud/errata.py:1349:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:1381:15: W0718: Catching too general exception Exception (broad-exception-caught)
alws/crud/errata.py:1409:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:1459:19: W0718: Catching too general exception Exception (broad-exception-caught)
alws/crud/errata.py:1496:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:1496:0: R0912: Too many branches (13/12) (too-many-branches)
alws/crud/errata.py:1586:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module alws.database
alws/database.py:1:0: C0114: Missing module docstring (missing-module-docstring)
alws/database.py:26:0: C0115: Missing class docstring (missing-class-docstring)
alws/database.py:26:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/database.py:36:0: C0115: Missing class docstring (missing-class-docstring)
alws/database.py:36:0: R0903: Too few public methods (1/2) (too-few-public-methods)
************* Module alws.dramatiq.build
alws/dramatiq/build.py:68:0: C0301: Line too long (84/80) (line-too-long)
alws/dramatiq/build.py:1:0: C0114: Missing module docstring (missing-module-docstring)
alws/dramatiq/build.py:108:15: W0718: Catching too general exception Exception (broad-exception-caught)
alws/dramatiq/build.py:152:23: W0718: Catching too general exception Exception (broad-exception-caught)
alws/dramatiq/build.py:189:23: E1102: func.count is not callable (not-callable)
alws/dramatiq/build.py:197:23: E1102: func.count is not callable (not-callable)
alws/dramatiq/build.py:228:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/dramatiq/build.py:246:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module alws.models
alws/models.py:1535:0: C0301: Line too long (83/80) (line-too-long)
alws/models.py:1585:0: C0301: Line too long (85/80) (line-too-long)
alws/models.py:1:0: C0302: Too many lines in module (2099/1000) (too-many-lines)
alws/models.py:59:9: W0511: FIXME: Change nullable to False after owner population (fixme)
alws/models.py:78:9: W0511: FIXME: Change nullable to False after owner population (fixme)
alws/models.py:991:5: W0511: FIXME: change nullable to False after population (fixme)
alws/models.py:1225:5: W0511: FIXME: change nullable to False after population (fixme)
alws/models.py:1:0: C0114: Missing module docstring (missing-module-docstring)
alws/models.py:56:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:58:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:58:4: E0213: Method 'team_id' should have "self" as first argument (no-self-argument)
alws/models.py:70:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:70:4: E0213: Method 'team' should have "self" as first argument (no-self-argument)
alws/models.py:75:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:77:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:77:4: E0213: Method 'owner_id' should have "self" as first argument (no-self-argument)
alws/models.py:89:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:89:4: E0213: Method 'owner' should have "self" as first argument (no-self-argument)
alws/models.py:97:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:110:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:127:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:129:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:129:4: E0213: Method 'started_at' should have "self" as first argument (no-self-argument)
alws/models.py:133:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:133:4: E0213: Method 'finished_at' should have "self" as first argument (no-self-argument)
alws/models.py:229:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:285:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:289:45: E1101: Instance of 'CustomRepoRepr' has no 'name' member (no-member)
alws/models.py:289:57: E1101: Instance of 'CustomRepoRepr' has no 'arch' member (no-member)
alws/models.py:289:69: E1101: Instance of 'CustomRepoRepr' has no 'url' member (no-member)
alws/models.py:292:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:333:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:333:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/models.py:386:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:393:16: E1102: func.current_timestamp is not callable (not-callable)
alws/models.py:469:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:551:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:551:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/models.py:566:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:581:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:588:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:619:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:632:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:632:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/models.py:656:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:656:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/models.py:682:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:682:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/models.py:718:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:824:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:835:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:835:4: E0213: Method 'user_id' should have "self" as first argument (no-self-argument)
alws/models.py:843:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:851:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:851:4: E0213: Method 'user_id' should have "self" as first argument (no-self-argument)
alws/models.py:859:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:859:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/models.py:894:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:984:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1026:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:1030:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:1034:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1086:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1086:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/models.py:1101:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1101:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/models.py:1128:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1128:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/models.py:1148:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1148:0: R0901: Too many ancestors (8/7) (too-many-ancestors)
alws/models.py:1158:16: E1102: func.current_timestamp is not callable (not-callable)
alws/models.py:1220:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1273:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1273:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/models.py:1291:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1322:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1322:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/models.py:1333:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1333:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/models.py:1354:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1372:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1496:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:1501:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:1506:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:1518:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1518:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/models.py:1557:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1557:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/models.py:1601:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1659:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:1659:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
alws/models.py:1664:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:1664:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
alws/models.py:1668:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:1675:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1794:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:1799:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:1804:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:1816:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1816:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/models.py:1853:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1853:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/models.py:1865:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1865:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/models.py:1897:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1955:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:1955:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
alws/models.py:1960:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:1960:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
alws/models.py:1964:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/models.py:1970:0: C0115: Missing class docstring (missing-class-docstring)
alws/models.py:1970:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/models.py:2093:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module alws.pulp_models
alws/pulp_models.py:453:0: C0301: Line too long (84/80) (line-too-long)
alws/pulp_models.py:500:0: C0301: Line too long (85/80) (line-too-long)
alws/pulp_models.py:1:0: C0114: Missing module docstring (missing-module-docstring)
alws/pulp_models.py:12:0: C0115: Missing class docstring (missing-class-docstring)
alws/pulp_models.py:12:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/pulp_models.py:44:0: C0115: Missing class docstring (missing-class-docstring)
alws/pulp_models.py:44:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/pulp_models.py:71:0: C0115: Missing class docstring (missing-class-docstring)
alws/pulp_models.py:71:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/pulp_models.py:109:0: C0115: Missing class docstring (missing-class-docstring)
alws/pulp_models.py:109:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/pulp_models.py:139:0: C0115: Missing class docstring (missing-class-docstring)
alws/pulp_models.py:139:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/pulp_models.py:178:0: C0115: Missing class docstring (missing-class-docstring)
alws/pulp_models.py:178:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/pulp_models.py:210:0: C0115: Missing class docstring (missing-class-docstring)
alws/pulp_models.py:248:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/pulp_models.py:252:0: C0115: Missing class docstring (missing-class-docstring)
alws/pulp_models.py:252:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/pulp_models.py:290:0: C0115: Missing class docstring (missing-class-docstring)
alws/pulp_models.py:290:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/pulp_models.py:334:0: C0115: Missing class docstring (missing-class-docstring)
alws/pulp_models.py:334:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/pulp_models.py:387:0: C0115: Missing class docstring (missing-class-docstring)
alws/pulp_models.py:452:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/pulp_models.py:459:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/pulp_models.py:463:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/pulp_models.py:471:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/pulp_models.py:474:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/pulp_models.py:484:0: C0115: Missing class docstring (missing-class-docstring)
alws/pulp_models.py:499:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/pulp_models.py:503:0: C0115: Missing class docstring (missing-class-docstring)
alws/pulp_models.py:503:0: R0903: Too few public methods (1/2) (too-few-public-methods)
************* Module alws.release_planner
alws/release_planner.py:464:0: C0301: Line too long (81/80) (line-too-long)
alws/release_planner.py:1424:0: C0301: Line too long (111/80) (line-too-long)
alws/release_planner.py:1:0: C0302: Too many lines in module (1854/1000) (too-many-lines)
alws/release_planner.py:529:13: W0511: TODO: Add packages presence check in community repos (fixme)
alws/release_planner.py:797:9: W0511: TODO: Add support for checking existent packages in repos (fixme)
alws/release_planner.py:1561:25: W0511: TODO: need to send only one repo instead of list (fixme)
alws/release_planner.py:1736:17: W0511: TODO: we already have all repos in self.base_platform.repos, (fixme)
alws/release_planner.py:1:0: C0114: Missing module docstring (missing-module-docstring)
alws/release_planner.py:65:0: C0115: Missing class docstring (missing-class-docstring)
alws/release_planner.py:84:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:102:15: W0718: Catching too general exception Exception (broad-exception-caught)
alws/release_planner.py:115:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:152:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:159:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:163:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:173:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:181:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:188:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:188:22: W0613: Unused argument 'build' (unused-argument)
alws/release_planner.py:192:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:195:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:205:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:242:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:242:4: R0914: Too many local variables (25/15) (too-many-locals)
alws/release_planner.py:353:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:366:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:410:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:496:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:540:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:569:15: W0718: Catching too general exception Exception (broad-exception-caught)
alws/release_planner.py:598:0: C0115: Missing class docstring (missing-class-docstring)
alws/release_planner.py:624:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:635:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:668:4: R0914: Too many local variables (25/15) (too-many-locals)
alws/release_planner.py:687:12: W0612: Unused variable 'src_rpm_names' (unused-variable)
alws/release_planner.py:768:4: R0914: Too many local variables (26/15) (too-many-locals)
alws/release_planner.py:876:0: C0115: Missing class docstring (missing-class-docstring)
alws/release_planner.py:943:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:943:4: R0914: Too many local variables (30/15) (too-many-locals)
alws/release_planner.py:943:4: R0912: Too many branches (14/12) (too-many-branches)
alws/release_planner.py:1039:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:1058:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:1058:4: R0913: Too many arguments (6/5) (too-many-arguments)
alws/release_planner.py:1081:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:1134:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:1134:4: R0913: Too many arguments (7/5) (too-many-arguments)
alws/release_planner.py:1175:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:1175:4: R0913: Too many arguments (8/5) (too-many-arguments)
alws/release_planner.py:1175:4: R0914: Too many local variables (20/15) (too-many-locals)
alws/release_planner.py:1261:4: W0237: Parameter 'base_platform' has been renamed to 'build_ids' in overriding 'AlmaLinuxReleasePlanner.get_release_plan' method (arguments-renamed)
alws/release_planner.py:1261:4: W0237: Parameter 'build_ids' has been renamed to 'base_platform' in overriding 'AlmaLinuxReleasePlanner.get_release_plan' method (arguments-renamed)
alws/release_planner.py:1261:4: R0914: Too many local variables (67/15) (too-many-locals)
alws/release_planner.py:1261:4: R0912: Too many branches (32/12) (too-many-branches)
alws/release_planner.py:1261:4: R0915: Too many statements (122/50) (too-many-statements)
alws/release_planner.py:1582:4: R0914: Too many local variables (45/15) (too-many-locals)
alws/release_planner.py:1604:16: W0707: Consider explicitly re-raising using 'raise SignError(msg) from e' (raise-missing-from)
alws/release_planner.py:1582:4: R0912: Too many branches (27/12) (too-many-branches)
alws/release_planner.py:1582:4: R0915: Too many statements (89/50) (too-many-statements)
alws/release_planner.py:1765:4: C0116: Missing function or method docstring (missing-function-docstring)
alws/release_planner.py:1847:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module alws.routers.errata
alws/routers/errata.py:96:5: W0511: TODO: Retrieve updateinfo based on record_id AND platform_id (fixme)
alws/routers/errata.py:120:1: W0511: TODO: Update this endpoint to include platform_id. (fixme)
alws/routers/errata.py:181:1: W0511: TODO: Update endpoint to take into account platform_id, see (fixme)
alws/routers/errata.py:1:0: C0114: Missing module docstring (missing-module-docstring)
alws/routers/errata.py:27:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/routers/errata.py:39:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/routers/errata.py:58:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/routers/errata.py:67:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/routers/errata.py:68:4: C0103: Argument name "pageNumber" doesn't conform to snake_case naming style (invalid-name)
alws/routers/errata.py:72:4: C0103: Argument name "platformId" doesn't conform to snake_case naming style (invalid-name)
alws/routers/errata.py:73:4: C0103: Argument name "cveId" doesn't conform to snake_case naming style (invalid-name)
alws/routers/errata.py:67:0: R0913: Too many arguments (8/5) (too-many-arguments)
alws/routers/errata.py:69:4: W0622: Redefining built-in 'id' (redefined-builtin)
alws/routers/errata.py:74:4: W0621: Redefining name 'status' from outer scope (line 3) (redefined-outer-name)
alws/routers/errata.py:93:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/routers/errata.py:113:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/routers/errata.py:124:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/routers/errata.py:141:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/routers/errata.py:150:38: E1101: Instance of 'ValueError' has no 'message' member (no-member)
alws/routers/errata.py:157:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/routers/errata.py:184:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/routers/errata.py:195:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/routers/errata.py:1:0: R0801: Similar lines in 2 files
==alws.crud.errata:[1309:1315]
==alws.release_planner:[213:219]
        RpmPackage.name,
        RpmPackage.epoch,
        RpmPackage.version,
        RpmPackage.release,
        RpmPackage.arch,
    ] (duplicate-code)
alws/routers/errata.py:1:0: R0801: Similar lines in 2 files
==alws.crud.errata:[569:575]
==alws.release_planner:[212:218]
            RpmPackage.content_ptr_id,
            RpmPackage.name,
            RpmPackage.epoch,
            RpmPackage.version,
            RpmPackage.release,
            RpmPackage.arch, (duplicate-code)

-----------------------------------
Your code has been rated at 8.52/10

Copy link

github-actions bot commented Mar 5, 2024

Total coverage

Coverage report for changed files •
FileStmtsMissCoverMissing
database.py200100% 
models.py6353794%112, 121, 289, 582, 628, 1027, 1497–1499, 1502–1504, 1511, 1660–1661, 1665–1666, 1669–1671, 1795–1797, 1800–1802, 1809, 1956–1957, 1961–1962, 1965–1967, 2094–2095, 2099
pulp_models.py206796%249, 453, 456, 460, 464, 472, 500
TOTAL9703421556% 

Tests Skipped Failures Errors Time
81 2 💤 0 ❌ 0 🔥 43.255s ⏱️

@Kwaizer Kwaizer force-pushed the bs_203_sqla_v2 branch 25 times, most recently from 54a00dd to 604fd68 Compare March 7, 2024 20:26
@Korulag Korulag merged commit 2e54521 into AlmaLinux:master Mar 11, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate Sqlalcehmy to the v2
3 participants