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

fix bug #264

Merged
merged 2 commits into from
Oct 30, 2023
Merged

fix bug #264

merged 2 commits into from
Oct 30, 2023

Conversation

Theodore-Chatziioannou
Copy link
Contributor

@Theodore-Chatziioannou Theodore-Chatziioannou commented Oct 30, 2023

Fix for #263 .

Checklist

Any checks which are not relevant to the PR can be pre-checked by the PR creator.
All others should be checked by the reviewer(s).
You can add extra checklist items here if required by the PR.

  • CHANGELOG updated
  • Tests added to cover contribution
  • Documentation updated

@@ -210,3 +210,14 @@ def test_get_attributes_from_person():
assert pid == "chris"
assert attributes["hid"] == "A"
assert attributes["vehicles"] == {"car": "chris"}


def test_get_float_attribute_from_person():
Copy link
Contributor

Choose a reason for hiding this comment

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

When you ran this test before fixing the bug, did it throw an exception?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it was trying to cast a lxml element as float (float(attr)), instead of the element value (attr.text)

Copy link
Contributor

@brynpickering brynpickering left a comment

Choose a reason for hiding this comment

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

Good catch!

@brynpickering
Copy link
Contributor

@Theodore-Chatziioannou you need to run pre-commit locally!

@Theodore-Chatziioannou
Copy link
Contributor Author

@Theodore-Chatziioannou you need to run pre-commit locally!

pre-commit run ? It is not changing anything..

@brynpickering
Copy link
Contributor

hmm, pre-commit should have fixed this issue when you first committed (assuming you have run pre-commit install within your pam environment). Anyway, pre-commit run -a should force it to run it on the files you've already committed.

@Theodore-Chatziioannou Theodore-Chatziioannou merged commit 76eddc3 into main Oct 30, 2023
11 checks passed
@Theodore-Chatziioannou Theodore-Chatziioannou deleted the fix_issue_263 branch October 30, 2023 17:16
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.

3 participants