-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 83 replace poetry co by uv and ruff #91
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
base: main
Are you sure you want to change the base?
Conversation
…led if not there by default
|
||
return EventType( | ||
event_type=event_type, | ||
is_phantom=is_phantom, | ||
schema=schema, | ||
) | ||
|
||
def __hash__(self) -> str: | ||
# Convert dictionary schema to a hashable form (tuple of items) | ||
def __hash__(self) -> int: |
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.
Wofür wird diese Funktion genutzt?
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.
Die Methode wird tatsächlich indirekt gebraucht. Im Test wird ein set[EventType] verwendet:
test_read_event_types.py
Damit Python-Objekte in einem set verwendet oder mit == verglichen werden können, müssen sie hashbar sein. Das bedeutet, sie brauchen sowohl hash als auch eq Methoden.
Ohne hash würde Python einen Fehler werfen, wenn Sie versuchen, EventType-Objekte zu einem Set hinzuzufügen oder Sets zu vergleichen.
Die hash Methode ist also essentiell für:
Das Hinzufügen von EventType zu Sets
Den Vergleich der beiden Sets mit assert actual_event_types == expected_event_types
Die allgemeine Verwendung von EventType als Schlüssel in Dicts oder als Element in Set
Makefile
Outdated
@find . -type d -name __pycache__ -exec rm -rf {} + | ||
@find . -type f -name "*.pyc" -delete | ||
@find . -type f -name "*.pyo" -delete | ||
@find . -type f -name "*.pyd" -delete | ||
@find . -type f -name ".coverage" -delete | ||
@find . -type d -name "*.egg-info" -exec rm -rf {} + | ||
@find . -type d -name "*.egg" -exec rm -rf {} + | ||
@find . -type d -name ".pytest_cache" -exec rm -rf {} + | ||
@find . -type d -name ".mypy_cache" -exec rm -rf {} + | ||
@rm -rf build/ dist/ .coverage htmlcov/ |
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.
Alles, was hier aufgelistet ist, sollte auch in der .gitignore
ausgeschlossen werden.
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.
Hab eine .gitingore mit den wichtigsten Paramtern erstellt. Habe mir überlegt clean herauszunehmen aus dem makefile. Ich erwarte von jedem "Entwickler" das er das kann. :)
@atstaeff Das |
No description provided.