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

Refine execute_command function for printing aligned tabbed tables #1379

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

jiridanek
Copy link
Member

The commit adds type hints to parameters and return type of the execute_command function in util.py script. It also introduces a change in printing logic to handle tabs. Further, new test cases are added in test_util.py script to confirm this behavior.

Before

10:31:54  >: Cluster Admin:		true
10:31:54  >: Organization:		N/A
10:31:54  >: Creator:		N/A
10:31:54  >: Email:			N/A
10:31:54  >: AccountNumber:          N/A
10:31:54  >: Created:		2024-04-12T08:31:54Z
10:31:54  >: Expiration:		2024-04-13T20:31:53Z

After

20:02:16  >: Cluster Admin:          true
20:02:16  >: Organization:           N/A
20:02:16  >: Creator:                N/A
20:02:16  >: Email:                  N/A
20:02:16  >: AccountNumber:          N/A
20:02:16  >: Created:                2024-04-12T18:02:16Z
20:02:16  >: Expiration:             2024-04-14T06:02:15Z

@jiridanek jiridanek added verified This PR has been tested with Jenkins utils Enhancements in scripts and CI/CD (PR will be listed in release-notes) labels Apr 12, 2024
@jiridanek jiridanek self-assigned this Apr 12, 2024
Copy link
Contributor

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass %
448 0 0 448 100

The commit adds type hints to parameters and return type of the `execute_command` function in util.py script. It also introduces a change in printing logic to handle tabs. Further, new test cases are added in test_util.py script to confirm this behavior.

### Before

```
10:31:54  >: Cluster Admin:		true
10:31:54  >: Organization:		N/A
10:31:54  >: Creator:		N/A
10:31:54  >: Email:			N/A
10:31:54  >: AccountNumber:          N/A
10:31:54  >: Created:		2024-04-12T08:31:54Z
10:31:54  >: Expiration:		2024-04-13T20:31:53Z
```

### After

```
20:02:16  >: Cluster Admin:          true
20:02:16  >: Organization:           N/A
20:02:16  >: Creator:                N/A
20:02:16  >: Email:                  N/A
20:02:16  >: AccountNumber:          N/A
20:02:16  >: Created:                2024-04-12T18:02:16Z
20:02:16  >: Expiration:             2024-04-14T06:02:15Z
```

Signed-off-by: Jiri Daněk <jdanek@redhat.com>
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
1.5% Duplication on New Code

See analysis details on SonarCloud

@jiridanek
Copy link
Member Author

jiridanek commented Apr 12, 2024

msg-qe-11 .xxx. /job/rhods/job/rhods-smoke/5/console

@jiridanek jiridanek merged commit c17eed8 into red-hat-data-services:master Apr 15, 2024
8 checks passed
@jiridanek jiridanek deleted the jd_pyright branch April 15, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
utils Enhancements in scripts and CI/CD (PR will be listed in release-notes) verified This PR has been tested with Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants