Using the "black" code formatter in Python

Using the "black" code formatter in Python

Assessment

Interactive Video

Architecture, Information Technology (IT)

University

Hard

Created by

Quizizz Content

FREE Resource

The video tutorial introduces Black, a code formatter for Python, highlighting its widespread adoption despite being in beta. Black is unique as it has no settings, ensuring consistent formatting across codebases, which enhances readability and reduces cognitive load for developers. It adheres to a strict subset of the Python style guide, maintaining code within 88 characters per line and normalizing various elements. While Black has configurable parameters, they are rarely needed, as the default settings are generally sufficient.

Read more

2 questions

Show all answers

1.

OPEN ENDED QUESTION

3 mins • 1 pt

Describe how Black handles long lines of code or function signatures.

Evaluate responses using AI:

OFF

2.

OPEN ENDED QUESTION

3 mins • 1 pt

What are some configurable parameters in Black, and when might you use them?

Evaluate responses using AI:

OFF