Clone
1
Contributing
Kierre edited this page 2025-11-27 23:44:58 +01:00

Contributing guide

Code style

A more compact form of code is preferred over an expanded form. This means that this:

@server.route("/_matrix/federation/unstable/io.fsky.vel/edutypes")
@server.route("/_matrix/federation/v1/edutypes")
async def edutypes():
	return jsonify({
		"m.presence": False,
		"m.receipt": False,
		"m.typing": False,
	})

is preferred over:

@server.route("/_matrix/federation/unstable/io.fsky.vel/edutypes")
@server.route("/_matrix/federation/v1/edutypes")
async def edutypes():
	return jsonify(
		{
			"m.presence": False,
			"m.receipt": False,
			"m.typing": False,
		}
	)

Tab indent is used instead of space indent.

Strings should use doubled quotes instead of single ones unless double quotes are included in the string itself.

This means that this:

variable = "Oh, I know who that is, hes getting fired"

is preferred over:

variable = 'Oh, I know who that is, hes getting fired'

and this:

variable = '"Oh, I know who that is, hes getting fired"'

is preferred over:

variable = "\"Oh, I know who that is, hes getting fired\""

pre-commit should also be ran before commiting code.

Commit messages

It is recommended that the conventional commits scheme not be used. Commit messages should accurately describe what has changed.