Skip to content

[Wyscout V3] Add shot result z coordinates#427

Merged
probberechts merged 3 commits intoPySport:masterfrom
my-game-plan:feature/wyscout/v3/shot-result-z-coordinates
May 17, 2025
Merged

[Wyscout V3] Add shot result z coordinates#427
probberechts merged 3 commits intoPySport:masterfrom
my-game-plan:feature/wyscout/v3/shot-result-z-coordinates

Conversation

@DriesDeprest
Copy link
Contributor

I extended the parsing of Wyscout V3 shot result coordinates to also contain z coordinates. I also now recognize shots on the posts and give them the relevant result coordinates.

Comment on lines +177 to +179
for zone in cls:
if zone.code == code:
return zone.point
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can avoid the loop here:

Suggested change
for zone in cls:
if zone.code == code:
return zone.point
if code in cls.__members__:
return cls[code].point
warnings.warn(f"Invalid shot zone code: {code}")
return None

Copy link
Contributor Author

Choose a reason for hiding this comment

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

        if code in cls.__members__:
            return cls[code].point
        warnings.warn(f"Invalid shot zone code: {code}")
        return None

didn't work for me, so I kept it as is.

@koenvo koenvo added this to the 3.17.0 milestone May 13, 2025
@probberechts probberechts merged commit 6e20b4d into PySport:master May 17, 2025
19 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.

3 participants