8000 Minor Polishes · realpython/python-guide@ad22d25 · GitHub
[go: up one dir, main page]

Skip to content

Commit ad22d25

Browse files
Minor Polishes
1 parent 558e60c commit ad22d25

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

docs/writing/license.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Choosing a License
66

77
.. image:: /_static/photos/33907149294_82d7535a6c_k_d.jpg
88

9-
Your source publication *needs* a license. In the US, if no license is
10-
specified, users have no legal right to download, modify, or distribute.
9+
Your source publication *needs* a license. In the US, unless a license is
10+
specified, users have no legal right to download, modify, or distribute the product.
1111
Furthermore, people can't contribute to your code unless you tell them what
1212
rules to play by. Choosing a license is complicated, so here are some pointers:
1313

docs/writing/logging.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The :mod:`logging` module has been a part of Python's Standard Library since
1010
version 2.3. It is succinctly described in :pep:`282`. The documentation
1111
is notoriously hard to read, except for the `basic logging tutorial`_.
1212

13-
As an alternative, `loguru <https://github.com/Delgan/loguru>`_ provides an approach to logging nearly as simple as using a simple ``print`` statement.
13+
As an alternative, `loguru <https://github.com/Delgan/loguru>`_ provides an approach for logging, nearly as simple as using a simple ``print`` statement.
1414

1515
Logging serves two purposes:
1616

@@ -59,7 +59,7 @@ using the ``__name__`` global variable: the :mod:`logging` module creates a
5959
hierarchy of loggers using dot notation, so using ``__name__`` ensures
6060
no name collisions.
6161

62-
Here is an example of best practice from the `requests source`_ -- place
62+
Here is an example of the best practice from the `requests source`_ -- place
6363
this in your ``__init__.py``:
6464

6565
.. code-block:: python
@@ -83,7 +83,7 @@ application environment.
8383
There are at least three ways to configure a logger:
8484

8585
- Using an INI-formatted file:
86-
- **Pro**: possible to update configuration while running using the
86+
- **Pro**: possible to update configuration while running, using the
8787
function :func:`logging.config.listen` to listen on a socket.
8888
- **Con**: less control (e.g. custom subclassed filters or loggers)
8989
than possible when configuring a logger in code.
@@ -94,13 +94,13 @@ There are at least three ways to configure a logger:
9494
- **Con**: less control than when configuring a logger in code.
9595
- Using code:
9696
- **Pro**: complete control over the configuration.
97-
- **Con**: modifications require a change to source code.
97+
- **Con**: modifications require a change to the source code.
9898

9999

100100
Example Configuration via an INI File
101101
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
102102

103-
Let us say the file is named ``logging_config.ini``.
103+
Let us say that the file is named ``logging_config.ini``.
104104
More details for the file format are in the `logging configuration`_
105105
section of the `logging tutorial`_.
106106

docs/writing/structure.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ the project? What features and functions can be grouped together and
1818
isolated? By answering questions like these you can begin to plan, in
1919
a broad sense, what your finished product will look like.
2020

21-
In this section we take a closer look at Python's module and import
21+
In this section, we take a closer look at Python's modules and import
2222
systems as they are the central elements to enforcing structure in your
2323
project. We then discuss various perspectives on how to build code which
2424
can be extended and tested reliably.
@@ -32,7 +32,7 @@ It's Important.
3232
:::::::::::::::
3333

3434
Just as Code Style, API Design, and Automation are essential for a
35-
healthy development cycle, Repository structure is a crucial part of
35+
healthy development cycle. Repository structure is a crucial part of
3636
your project's
3737
`architecture <http://www.amazon.com/gp/product/1257638017/ref=as_li_ss_tl?ie=UTF8&tag=bookforkind-20&linkCode=as2&camp=1789&creative=39095&creativeASIN=1257638017>`__.
3838

@@ -54,8 +54,7 @@ documentation.
5454

5555
Of course, first impressions aren't everything. You and your colleagues
5656
will spend countless hours working with this repository, eventually
57-
becoming intimately familiar with every nook and cranny. The layout of
58-
it is important.
57+
becoming intimately familiar with every nook and cranny. The layout is important.
5958

6059
Sample Repository
6160
:::::::::::::::::
@@ -126,7 +125,7 @@ If you aren't sure which license you should use for your project, check
126125
out `choosealicense.com <http://choosealicense.com>`_.
127126

128127
Of course, you are also free to publish code without a license, but this
129-
would prevent many people from potentially using your code.
128+
would prevent many people from potentially using or contributing to your code.
130129

131130
Setup.py
132131
::::::::
@@ -157,8 +156,8 @@ should be placed at the root of the repository. It should specify the
157156
dependencies required to contribute to the project: testing, building,
158157
and generating documentation.
159158

160-
If your project has no development dependencies, or you prefer
161-
development environment setup via ``setup.py``, this file may be
159+
If your project has no development dependencies, or if you prefer
160+
setting up a development environment via ``setup.py``, this file may be
162161
unnecessary.
163162

164163
Documentation

0 commit comments

Comments
 (0)
0