Python code quality: tools and aspects¶
Tuesday, June 2nd 2026, 19:00
Spektral, Lendkai 45, 8020 Graz
This time there will be a theme evening with several talks and a discussion on the overarching topic "Python code quality". While some say that more source code means more productivity, others say that every line of source code is a liability. In addition to the quantity, however, the characteristics of each line of source code are decisive for how well a software application behaves and how easy it is to make changes.
Although Python has a dynamic type system and thus a lot of information is only available at runtime, there are some tools to evaluate the maintainability, comprehensibility, efficiency, and robustness of an application purely on the basis of the source code.
During this Meetup, we'll take a look at some of them.
Pre-commit hooks and prek¶
Balasz
TBD
Type checking with Ty¶
Thomas
Slides and code examples
Python type hints are optional and never validated by the interpreter, but can still be helpful for documentation and navigating withing an IDE. Using type checkers, they can also be used to statically check for type violations.
This talk introduces the basics of type hints including a few more advanced topics like forward references and generators.
In conclusion, Python type hints can be helpful to create better code, but are still a moving target and have some idiosyncrasies.
AI + testing¶
Sebastian
TBD
Data harvesting your git history¶
Dorian
A Microsoft paper (2005) claimed :
"churn-based metrics predicted defects more reliably than complexity metrics alone."
This is language independend, so lets find our what we can use to analyse a git source code repository ..
the 20 most churned files¶
see the most changed files.
who build the repository¶
see who commited how often.
who build it an the last 6 month¶
see who commited how often lately.
where were bugs documented¶
what does the log say about problems (examplary terms).
git log -i -E --grep="fix|bug|broken" --name-only --format='' | sort | uniq -c | sort -nr | head -20
when was alot of work done¶
activity in the project matters too.
when did the repo burn¶
see documented troubles (examplary terms)
Links¶
Here are some links mentioned during our discussion after the talks.
- PyGraz community chat: We have a Discord channel now. Due to its increasing enshittification, we also discussed a few possible open source alternatives.
- Video: 4 words triggered a war: The story of Mitchell Hashimoto's "controversial" quote
I read the code.
- Chatto, a possible open source alternative to Discord.