Skip to content

Commit 2c9aa20

Browse files
committed
some minor improvements
1 parent aef8545 commit 2c9aa20

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

bibliography/bibliography.bib

+1-1
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ @book{B1894DAZDVPB
688688

689689
@article{B1991IWNT,
690690
author = a_beigel_richard,
691-
title = {Irrationality Without Number Theory},
691+
title = {Irrationality without Number Theory},
692692
xdata = {j_tamm},
693693
date = {1991-04},
694694
volume = {98},

notation/terms.sty

+2-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ text={linter},%
111111
name={linter},%
112112
sort={linter},%
113113
description={%
114-
A linter is a tool for analyzing static program code to identify bugs, problems, vulnerabilities, and inconsistent code styles~\cite{J1978LACPC,RJYKK2022CULTDVM}.%
114+
A linter is a tool for analyzing static program code to identify bugs, problems, vulnerabilities, and inconsistent code styles~\cite{J1978LACPC,RJYKK2022CULTDVM}. %
115+
\ruff\ is an example for a linter used in the \python\ world.%
115116
}%
116117
}%
117118
%

text/back/scripts.tex

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
Now, our book focuses on \python\ programming, so \bash\ shell scripts are not in the center of our attention.
1313
We here cannot explain how \bash\ scripts work or what their syntax is.
1414
There exist plenty of books and resources on this interesting topic, such as~\cite{NR2005LTBSUSPCB3,Z2017MB,BN2018BC} or \url{https://www.gnu.org/software/bash/}.
15-
If we would include the scripts in the places where we use them in this book, then this would lead to confusion or tangents in the text which would mess up the flow of chapters.
15+
If we would include the scripts in the places where we use them in this book, then this would lead to confusion or tangents in the text which would mess up the flow of the chapters.
1616
Nevertheless, the book would be incomplete if these scripts were not provided at all.
1717
So we put them here, at the end of the book, where they do not hurt anyone and where the interested reader may check them out.%
1818

@@ -23,14 +23,16 @@
2323
Then, it executes it.
2424
\mypy\ will print its comments and messages to the standard output.
2525
Finally, the script shows the \mypy\ version and exit code in a brief success or failure message (with a prepended~\expandafter\textil{\#}).
26+
\Cref{exec:variables:variable_types_wrong_hints_1:mypy,exec:variables:variable_types_wrong_hints_2:mypy} are example outputs of this script.
2627

2728
\Cref{lst:bash:ruff} works basically the same way, just for \ruff.
2829
However, it sets a lot more parameters to \ruff.
2930
See, \ruff\ offers many more configuration options and many more different things that it can check for, compared to \mypy.
3031
In it's present form, it does not check for type errors, as far as I know, though.
3132
Either way, it is harder to balance the strictness of the tool and there are even some rules which are sometimes mutually exclusive.
3233
Hence, we compose a more complex command.
33-
Apart from that, this script works pretty much the same as \cref{lst:bash:mypy}.%
34+
Apart from that, this script works pretty much the same as \cref{lst:bash:mypy}.
35+
\Cref{exec:lists:lists_error:ruff,exec:lists:lists_fixed:ruff} are examples for the output of this script.%
3436
%
3537
\endhsection%
3638
%

text/main/basics/collections/lists/lists.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
\gitOutput{\programmingWithPythonCodeRepo}{.}{scripts/ruff.sh 02_collections lists_error.py}{lists:lists_error:ruff}{%
182182
The results of linting with \ruff\ of the program given in \cref{lst:lists:lists_error}. (We used the script given in \cref{lst:bash:ruff} on \cpageref{lst:bash:ruff} to apply \ruff.)}%
183183
%
184-
Let us apply \ruff\ to the program \textil{lists_error.py} given in \cref{lst:lists:lists_error}.
184+
Let us apply \ruff\ to the program \textil{lists_error.py} given in \cref{lst:lists:lists_error}, which produces the output \cref{exec:lists:lists_error:ruff}.
185185
\ruff\ finds two errors in this file:
186186
First, it complains that any python file should start with multi-line string specifying the purpose of the file.
187187
The use of such \pglspl{docstring} makes it easier for other programmers to understand what is done by which file in projects that are composed of multiple \python\ scripts.%

0 commit comments

Comments
 (0)