mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Update Python Port
parent
5caaac5a3b
commit
867c799609
1 changed files with 8 additions and 0 deletions
|
@ -115,6 +115,14 @@ and spacing. `autopep8` can be used to automatically format your code
|
||||||
5. SQLAlchemy ORM model attributes should be Capitalized if they are literal table columns or *forward references*, otherwise snake_cased for *backref references*.
|
5. SQLAlchemy ORM model attributes should be Capitalized if they are literal table columns or *forward references*, otherwise snake_cased for *backref references*.
|
||||||
6. Use typed arguments as often as possible. We'd like to show users the types of arguments without relying on documentation, and this helps a ton with that.
|
6. Use typed arguments as often as possible. We'd like to show users the types of arguments without relying on documentation, and this helps a ton with that.
|
||||||
|
|
||||||
|
A few small clues about some of our local `aurweb` package utilities that should be used in tests:
|
||||||
|
- Always use aurweb.db.(create|delete|query) for database
|
||||||
|
operations, where possible.
|
||||||
|
- Always define mutable globals in the style: `var1 = var2 = None`.
|
||||||
|
- `yield` the most dependent model in pytest setup fixture **iff**
|
||||||
|
you must delete records after test runs to maintain database
|
||||||
|
integrity. Example: test/test_account_type.py.
|
||||||
|
|
||||||
## Who, Where?
|
## Who, Where?
|
||||||
<div id="who-where"></div>
|
<div id="who-where"></div>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue