Releases: point85/PyShift
Releases · point85/PyShift
Python Shift Library
- Claude Sonnet 4.5
Critical Bugs Fixed:
Parameter Shadowing Bug in team.py:159: Fixed toTimeOfDay parameter being reassigned, which caused variable shadowing
Bare Exception Handling: Replaced bare except: clauses with proper Exception handling in team.py:245 and team_member.py
Performance Optimizations:
String Concatenation: Replaced inefficient string concatenation in loops with list comprehension + join() in:
Comparison Operators: Simplified comparison operators in named.py using @functools.total_ordering decorator, reducing code duplication
Code Quality Improvements:
Import Statements: Converted all absolute imports (from PyShift.workschedule.) to relative imports (from .) in all 13 Python files for better package portability
Fixed bare [] type hints to proper List[Type] annotations
Added Optional[Type] for nullable fields
Improved return type hints throughout
F-strings: Modernized string formatting using f-strings instead of % formatting for better readability and performance
Work schedule library
Updated the readme for PyPi
Work schedule library
- Updated to Python 3.13.4
- DayOff: changed start datetime to time in int
- Named: added Rotation.dayOff; Invalidated cached periods in addSegments()
- Moved ShiftInstance to its own file
- ShiftUtils: Use UTC to avoid timezone issues, improved formatTimedelta(), toRoundedSecond() - Standard rounding, improved compare()
- Team: calculateWorkingTime() - rename toTime to toTimeOfDay
- TeamMember: added setAddition() and setRemoval()
- TimePeriod: changed start datetime to time in int; simplified timePlus()
- WorkSchedule: fixed issue with deleteShift()
Python Work Schedule Library
- Added team members and shift exceptions for the team
- Created a PyPI distribution
Python Work Schedule Library
Created a PyPI distribution at pip install PyWorkShift==1.0.2
Python Work Schedule Library
Updated for Python 3.12
PyShift Project
This release is a port of the Point85 Java Shift library to Python.