« * K @trey.io

Trey Hunner @trey.io

Python & Django team trainer I help folks sharpen their Python skills with https://PythonMorsels.com 🐍🍪 I also blog at https://treyhunner.com & run https://Whereabouts.Earth PSF Fellow. YIMBY. 95% vegan.

4168 followers, 222 following, 2598 posts

1 This is called red-green-refactor: write a failing test and THEN fix your code …
@trey.io
2 A test may never run because its name doesn't start with test_. A test may mock…
@trey.io
3 Those parentheses make a tuple, which is always truthy. A test that could never…
@trey.io
4 Python Tip #329 (of 365): Make sure your tests can actually fail. 🧵 This test …
@trey.io
5 “Python's break stops the whole loop, but continue only stops a single iteratio…
@trey.io
6 Whichever setup you choose, take a minute to configure it: a config file in a p…
@trey.io
7 Most style guides and formatters follow PEP 8. PEP 8 was written for the standa…
@trey.io
8 The setups I recommend, in order of preference: • ruff for linting ("ruff check…
@trey.io
9 Auto-formatters do a bit more: instead of just noting issues, they restyle your…
@trey.io
# MoreBluesky home
☆ Save to home · 0 Home · Find · Games · Chat · AI · Setup