-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added checkups for excel files completion and candidate/course initia…
…lization
- Loading branch information
1 parent
97a76fe
commit f438f48
Showing
4 changed files
with
36 additions
and
13 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
class Course: | ||
def __init__(self, name, code, positions, discipline): | ||
self.name = name | ||
self.code = code.zfill(2) | ||
self.code = code | ||
if self.code is None: | ||
raise ValueError("Course has no code!") | ||
self.name = name if name is not None else self.code | ||
self.positions = int(positions) | ||
self.discipline = discipline | ||
self.discipline = discipline if discipline is not None else "générale" | ||
self.candidates = [] | ||
|
||
def __repr__(self): # pragma: no cover | ||
return self.name |
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