-
-
Notifications
You must be signed in to change notification settings - Fork 27
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 next session times #67
Open
stucharo
wants to merge
2
commits into
Esterni:master
Choose a base branch
from
stucharo:fix-next-session-times
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason for this class to be a part of the
NextSessionTimes
class, we may end up using it again if we find an endpoint that returns raceweekcars.Also, we have one or two more, similar
Car
classes, is there potential for code reuse there? I know i have seen some type of car with an id and a max dry tire sets and so on before, so lets make sure we aren't repeating code just in case.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@XanderRiga Isn't this nested class in line with how we have the other classes setup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cases where we did that we were extending another
Car
and it was a type of car that we would never see anywhere else because they sent different data. I am not super sure that is the case here since they specifically refer to it asraceWeekCars
, which to me implies this is a specific type of car that is a race week car, which I believe could be reused.That being said, if we want to keep it as a class inside the other class it's fine, but we should at least be doing the extending of the base car and only adding the specific fields that don't exist in the base class here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
race_week_cars
is an attribute ofNextSessionTimes
andRaceGuide.Schedule.Race
so I agree that it doesn't make sense to subclass withNextSessionTimes
. AlsoRaceWeekCars
is a bit ambiguous since whilst it does list the carid
for that session, it's more about some session specific attributes for those cars, which aren't really logical attributes of any otherCar
classes.So logically it might sit better as a subclass of
Race
, but that makes it difficult to access fromNextSessionTimes
. Leaving it as a standalone class feels like the best place to define it and make it accessible to every object that needs access.