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

Remove deprecated use of count as positional arg #62

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

paul-elliott-arm
Copy link
Member

No intended change in functionality. Just removing the deprecated warning I am getting every time I generate test code.

Python 13 requires count to be passed as a kwarg rather than a positional arg because of potential confusion with flags, see python/cpython#56166

@paul-elliott-arm paul-elliott-arm self-assigned this Oct 25, 2024
@paul-elliott-arm paul-elliott-arm added enhancement New feature or request needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review single-reviewer This PR qualifies for having only one reviewer size-xs Estimated task size: extra small (a few hours at most) labels Oct 25, 2024
Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaks pylint

@@ -762,7 +762,7 @@ def escaped_split(inp_str, split_char):
raise ValueError('Expected split character. Found string!')
out = re.sub(r'(\\.)|' + split_char,
lambda m: m.group(1) or '\n', inp_str,
len(inp_str)).split('\n')
count = len(inp_str)).split('\n')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
count = len(inp_str)).split('\n')
count=len(inp_str)).split('\n')

otherwise pylint will complain

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Until we have a CI in the framework repository, please at least run directly relevant tests. Here, at least check-python-files.sh (in a CI-like venv), and make tests.

@gilles-peskine-arm gilles-peskine-arm added needs-work and removed needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review single-reviewer This PR qualifies for having only one reviewer labels Oct 25, 2024
Python 13 requires count to be passed as a kwarg rather than a
positional arg because of potential confusion with flags, see
python/cpython#56166

Signed-off-by: Paul Elliott <[email protected]>
@paul-elliott-arm paul-elliott-arm force-pushed the remove_re_sub_count_positional_arg branch from 03b11fb to 59ec32a Compare November 13, 2024 14:48
@paul-elliott-arm paul-elliott-arm added needs-ci Needs to pass CI tests and removed needs-work labels Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-ci Needs to pass CI tests size-xs Estimated task size: extra small (a few hours at most)
Projects
Status: In Development
Development

Successfully merging this pull request may close these issues.

2 participants